Posted by:
tribippy
(---.clvdoh.adelphia.net)
I'm a PHP/MySQL noobie. I have been trying to connect with MySQL. I get the following message:
Fatal error: Call to undefined function mysql_connect() in C:\wamp\www\TagProject\mysql_connect.php on line 2
Here is my code (just a simple exercise). I am not using a password--what looks like one double-quote after [ 'root', ] is actually two single quotes with nothing in between:
<?php
$link = mysql_connect('localhost','root','');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
I saw on a different blog where someone had written: "The error you received is because the install script could not make a connection to the MySQL database. "
Is this really the problem, and how do I fix it? MySQL runs fine, by the way.
Thanks