MySQL Forums
Forum List  »  PHP

Re: php mysql connection help..
Posted by: Dragon Knight
Date: June 04, 2005 11:46PM

ok, I managed to figure out that the host is localhost, user is root, and password is 12345

but when I type

<?php
$link = mysql_connect('localhost', 'root', '12345');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>


it shows this error:

Fatal error: Call to undefined function mysql_connect() in c:\Inetpub\wwwroot\project\new.php on line 13

please help me, I'm using mysql server 4.1, php 5.0.4

Options: ReplyQuote




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.