I'm trying to connect to MySQL with the following code:
Code: Select all
<html>
<head>
<title>Hello</title>
</head>
<body>
<?php
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = '';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
$dbname = 'bands';
mysql_select_db($dbname);
?>
</body>
</html>
"Fatal error: Call to undefined function mysql_connect() in G:\www\test.php on line 11"
Please help!
Thanks in advance...
Cheers,
Utsav