A
Anonymous
Guest
I have been trying to figure out where this error is coming from and I cannot. The error is Parse error: parse error, unexpected $ in /home/users/dev/public_html/mmrentals/email_mmrpass.php on line 215
The code is long, sorry but here it is:
There is also additional html code under this code that I won't take up space with, but the line number is the error is the last line of HTML on the page.
Can anybody help?
TIA
roliver
The code is long, sorry but here it is:
Code:
<?php
session_start();
//site_defines
$SECURED_PAGE = 'mmr_login.php?reason=1';
// If the form was submited check if the username and password match
if($_POST['submitid'] == 2){
$username = $_POST["username"];
$dbconn = mysql_connect (localhost, dev_mmr, mmr)
or die('I cannot connect to the database because: ' . mysql_error() );
mysql_select_db(dev_mmrentals, $dbconn);
$result = mysql_query("SELECT * from mmr_users WHERE username='$username'");
$row = mysql_fetch_array($result);
/* recipients */
$to1 = $row['email'];
/* email */
$email1 = $_post['email'];
/* subject */
$subject1 = $_post['subject'];
/* message */
$html_message.= "<html><head></head><body>
$html_message.= "<table width=100% border=0 cellpadding=0 cellspacing=0 bgcolor=#6F390A><tr><td align=center valign=top>";
$html_message.= "<table width=500 border=0 cellpadding=0 cellspacing=0 bgcolor=#FFFFFF><tr>";
$html_message.= "<td width=500 colspan=2><img src=http://www.dev.chattanoogawebsites.com/mmrentals/images/email_logo.jpg width=500 height=137></td>";
$html_message.= "</tr><tr><td valign=top height=300>";
$html_message.= "<table border=0 cellpadding=0 cellspacing=0><tr><td valign=top width=486 align=center>";
$html_message.= "<table width=100% border=0 cellspacing=3 cellpadding=0 style=font-family: arial;><tr><td rowspan=6>";
$html_message.= "<img src=http://www.dev.chattanoogawebsites.com/mmrentals/images/copper.gif width=174 height=130 hspace=0 border=0 vspace=0>";
$html_message.= "</td></tr><td height=100 colspan=2 align=center>";
$html_message.= "<b>Forgot Your Password</b></td></tr>";
$html_message.= "<tr><td colspan=2 align=center>";
$html_message.= "Your password was requested by someone attemping to access the employee area of the";
$html_message.= "website. Please note that this email address is the only way to access your password.";
$html_message.= "<p>";
$html_message.= "Your password is <b><i>".$row['password']."</i></b>";
$html_message.= "<p>";
$html_message.= "Please put it in a secure area.";
$html_message.= "</td></tr>";
$html_message.= "<tr><td height=20>";
$html_message.= "</td></tr>";
$html_message.= "<tr><td>";
$html_message.= "<img src=http://www.dev.chattanoogawebsites.com/mmrentals/images/gus_sign.gif height=47 width=316>";
$html_message.= "</td></tr>";
$html_message.= "</table>";
$html_message.= "</td></tr>";
$html_message.= "</table>";
$html_message.= "</td><td width=14 rowspan=2>
$html_message.= "<img src=http://www.dev.chattanoogawebsites.com/mmrentals/images/side_shadow.gif width=14 height=613 border=0 hspace=0 vspace=0>";
$html_message.= "</td></tr>";
$html_message.= "<tr><td valign=bottom align=center style=ont-family:arial;font-size:7pt;>";
$html_message.= "Designed, Developed, and Maintained by <a href=http://www.chattanoogawwebsites.com>ChattanoogaWebSites.com</a>";
$html_message.= "</td></tr>";
$html_message.= "</table>";
$html_message.= "</td></tr>";
$html_message.= "</table>";
$html_message.= "</body></html>";
/* To send HTML mail, you can set the Content-type header. */
$headers1 = "MIME-Version: 1.0\r\n";
$headers1 .= "Content-type: text/html; charset=iso-8859-1\r\n";
/* additional headers */
$headers1 .= "From: ".$email1."\r\n";
$headers1 .= "Reply-To: ".$email1."\r\n";
$headers1 .= "Cc: \r\n";
/* and now mail it */
if(mail($to1, $subject1, $html_message, $headers1)){
header("Location: $SECURED_PAGE");
exit();
} else {
$message = 'There was an error in the send engine. Please try again later.';
}
?>
There is also additional html code under this code that I won't take up space with, but the line number is the error is the last line of HTML on the page.
Can anybody help?
TIA
roliver