MySQL Forums
Forum List  »  Newbie

MySql complete newbie, first day :)
Posted by: Steve Taylor
Date: July 15, 2005 03:29PM

Hi all, started learning PHP and MySQL. Trying to set up a test to see if Mysql is working, and found this script in a book...

<html>

<head>
<title>MySQL Connection Test</title>
</head>

<body>
<h2>
<?php $connection = mysql_connect( "localhost", "root", "" )
or die( "No Mysql" );
echo( "Connection Success" );
?>
</h2>
</body>

</html>

But when I use it I get this error message...

Fatal error: Call to undefined function mysql_connect() in f:\Apache\Apache\htdocs\mysqltest.php on line 9

All the ini files as far as I know are pointed to the right place for mysql to work. Php works and apache server is setup as correctly as I know how.

I'm obviously missing something somewhere, any help would be appreciated.

Thanks,

Steve.

Options: ReplyQuote


Subject
Written By
Posted
MySql complete newbie, first day :)
July 15, 2005 03:29PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.