Help me im only a novice

A

Anonymous

Guest
Hello im using apache php5 and mysql4.1..
i am just trying to connect to the database with a password and username..but an error occuer

Fatal error: Call to undefined function mysql_connect() in c:\webs\test\connect.php5 on line 5

Please help me

Here is my code


Code:
<html>
<head><title>Connect Server</title></head>
<body>
<?
$link = mysql_connect("localhost",$_POST['username'],$_POST['password'])or die("Connect 

Eror: ".mysql_error());
print "Successfully connected.\n";
mysql_close($link);
?>
</body>
</html>
 
in your php.ini file find extentions section.

find extention=php_mysql.dll and uncomment it
if it doesnt exists: find extention=php_mysqli.dll and copy that line, then paste it before/after the original line and uncomment it, and remove i from one of the lines.. this will assure you have the correct syntax and also make sure that you are loading the mysql extention... then restart your server..
 
Back
Top