mysql connect error
Posted: Mon Mar 27, 2006 3:00 pm
Hi, I am using this code to connect:
And when i try it out it gives me the error.
Whats wrong with it? i got it straight from the site?
Code: Select all
<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>Parse error: parse error, unexpected T_EXIT in /var/www/Esgames4uweb/phpinfo.php on line 4
Whats wrong with it? i got it straight from the site?