Parse error: syntax error, unexpected T_VARIABLE
Posted: Wed Jun 17, 2009 11:30 pm
This is racking my brain. I am getting the all infamous "Parse error: syntax error, unexpected T_VARIABLE" message. I know that the majority of the time it means your either missing a semi-colon or opening/closing brackets in statements. I have checked my code at least 20 times and I am just not seeing it!
im hoping someone here can help me, and point this out to my tired mind
exact error msg im getting is:
Parse error: syntax error, unexpected T_VARIABLE in /homepages/46/d285340853/htdocs/sms/SMS.Script.v2.1/config.php on line 19
here is the code:
<?
function db_connect()
{
$result = mysql_connect("localhost", "user", "pass"); // xxx, xxx, xxx
if(!$result)
return false;
if(!mysql_select_db("sms")) // xxx
return false;
return $result;
}
db_connect();
$alloweduses = 50 // The number of messages that users can send in one day (based on IP address)
// Headers for the message - they need some, and some prohibit them.
$headerstouse = "MIME-Version: 1.0\r\n". //On Request
"Content-type: text/html; charset=utf8\r\n"; //On Request
"From: \".$from."\r\n"; //Required
"To: \"Client\" <".$to.">\r\n";//Required
"Date: ".date("r")."\r\n";//Optional
"Subject: ".$subject."\r\n";//Optional
?>
so far ive had to convert the code from russian to english, so maybe something was lost in the translation.
im hoping someone here can help me, and point this out to my tired mind
exact error msg im getting is:
Parse error: syntax error, unexpected T_VARIABLE in /homepages/46/d285340853/htdocs/sms/SMS.Script.v2.1/config.php on line 19
here is the code:
<?
function db_connect()
{
$result = mysql_connect("localhost", "user", "pass"); // xxx, xxx, xxx
if(!$result)
return false;
if(!mysql_select_db("sms")) // xxx
return false;
return $result;
}
db_connect();
$alloweduses = 50 // The number of messages that users can send in one day (based on IP address)
// Headers for the message - they need some, and some prohibit them.
$headerstouse = "MIME-Version: 1.0\r\n". //On Request
"Content-type: text/html; charset=utf8\r\n"; //On Request
"From: \".$from."\r\n"; //Required
"To: \"Client\" <".$to.">\r\n";//Required
"Date: ".date("r")."\r\n";//Optional
"Subject: ".$subject."\r\n";//Optional
?>
so far ive had to convert the code from russian to english, so maybe something was lost in the translation.