Page 1 of 1

unexpected T_VARIABLE

Posted: Wed Apr 08, 2009 6:54 pm
by mikes1471
Hi Guys

When running this connection script it generates this response:
"Parse error: syntax error, unexpected T_VARIABLE in /var/www/vhosts/picfrisky.com/httpdocs/new/connect.php on line 6"

line 6 is this:

Code: Select all

$connect = mysql_connect("picfrisky.com","user_1","xxxxx") or die($error);

Code: Select all

<?php
//connect script
 
$error = "Problem connecting to the database. Please try again later on."
 
$connect = mysql_connect("picfrisky.com","user_1","xxxxx") or die($error);
mysql_select_db("users_db") or die($error);
 
?>
I'm just hoping someone can advise me where I've gone wrong as looking up other peoples articles on "unexpected T_VARIABLE" tends to generate some pretty non specific problems

Thanks in advance

Re: unexpected T_VARIABLE

Posted: Wed Apr 08, 2009 7:11 pm
by Christopher
Please do not post passwords.

You don't have a semicolon at the end of line 4.

Re: unexpected T_VARIABLE

Posted: Wed Apr 08, 2009 7:13 pm
by mikes1471
Thanks and the password is a dummy