...

View Full Version : Help me-parse error



shubho
05-12-2009, 05:41 AM
when I try to excute the following code it gives me the followng error

Parse error: syntax error, unexpected T_STRING contact_mass_email.php on line 8

[CODE]
<?php
include('header.php');
$subject = $HTTP_POST_VARS["subject"];
$subject = stripslashes($subject);
$content_1 = $HTTP_POST_VARS["content_1"];
$content_1 = htmlentities($content_1, ENT_QUOTES);
$content_1 = stripslashes($content_1);
$content_1 = "<font face="arial"> ".
$content_1 ." </font>";
$myDb->connect();
$SQL = mysql_query("SELECT email FROM yob_users");
$myDb->close();
while($row = mysql_fetch_array($SQL)){ $EmailAddress2[] = $row["email"];
}
$SITEEMAIL = $_POST['from'];
?>
[ICODE]

_Aerospace_Eng_
05-12-2009, 05:44 AM
You need to escape double quotes. Also you are using deprecated stuff like HTTP_POST_VARS? Where have you been learning php? I suggest you find a different site.

<?php
include('header.php');
$subject = $_POST["subject"];
$subject = stripslashes($subject);
$content_1 = $_POST["content_1"];
$content_1 = htmlentities($content_1, ENT_QUOTES);
$content_1 = stripslashes($content_1);
$content_1 = "<font face=\"arial\"> ";
$content_1 .= " </font>";
$myDb->connect();
$SQL = mysql_query("SELECT email FROM yob_users");
$myDb->close();
while($row = mysql_fetch_array($SQL))
{
$EmailAddress2[] = $row["email"];
}
$SITEEMAIL = $_POST['from'];
?>

shubho
05-12-2009, 05:58 AM
i found the same error message

_Aerospace_Eng_
05-12-2009, 06:33 AM
Please post your new code and the code for header.php.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum