mySQL connection problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
johnjalani
Forum Newbie
Posts: 6
Joined: Tue Apr 01, 2008 5:45 am

mySQL connection problem

Post by johnjalani »

please help me, i get this error,

Fatal error: Call to undefined function mysql_connect() in D:\GNSolutions\admin.php on line 21

this is my code,

<?php
mysql_connect(localhost, root, mypass);
mysql_select_db(GNSolutions);

$strSQL = "select * from login";
mysql_query($strSQL);

?>

what is wrong about this?
User avatar
EverLearning
Forum Contributor
Posts: 282
Joined: Sat Feb 23, 2008 3:49 am
Location: Niš, Serbia

Re: mySQL connection problem

Post by EverLearning »

Mysql extension is not loaded. Look into your php.ini and uncomment line(remove the ; character at the beginning og the line) which says something like

Code: Select all

extension=php_mysql.dll
Post Reply