Code: Select all
<?php
$username = "username....";
$password = "pass....";
$hostname = "localhost";
$link = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
print ( "Connected to MySQL" );
mysql_close($link);
?>Now when I try and open this script in my browser, I get this message:
Any suggestions as to what might be wrong?
Fatal error: Call to undefined function: mysql_connect() in /var/www/html/connect.php on line 7
thanks
kermit