Learning PHP - parase error help
Posted: Fri Feb 13, 2009 5:13 pm
Hey,
I'm watching some tutorials on PHP and the guy messed up
The die functions give a Parase error
How should they be setup?
P.S. I typed it in just as the guy did
Changed it afterward, but could not figure out how to make it work.
Thanks
I'm watching some tutorials on PHP and the guy messed up
The die functions give a Parase error
How should they be setup?
Code: Select all
//OPENS CONNECTION TO MYSQL SERVER
$dbc = mysql_connect('localhost','user','pass');
if (!$dbc){
die('Not connected' : . mysql_error());
}
//SELECT DATABASE
$db_selected = mysql_select_db("n_users", $dbc);
if (!$db_selected);
{
die ("cant connect : " . mysql_error());
}
Changed it afterward, but could not figure out how to make it work.
Thanks