database connection
Can anyone help
have just started to learn php and mySQL so am totally new to it all together and am trying to connect to the server with no luck keep getting this error "Fatal error: Call to undefined function mysql_connect() in C:\phpTestsite\index.php on line 6
" cant figure out what i'm doing wrong .
here is the code im using.
$hostname = "";
$username = "root";
$password = "secret";
$connection = mysql_connect($hostname, $username, $password);
if (!$connection) {
die("A connection to the server could not be established");
} else {
echo "User $username is logged onto the MySQL server, $hostname, successfully";
}
mysql_close($connection);
any help appreciated
ps using win xp pro and testing on iis 5 .other php pages work fine but its when i try to connect to the something i get the error.:(
|