Differences between phpMyAdmin & mysql_connect function
Posted on 2004-08-31
I am having problems with my host allowing PHP to connect to MySQL and I've got one question.
I have insttalled phpMyAdmin and gotten it to connect to my database but I am unable to connect using mysql_connect as it says the function is undefined. I would appreciate any documentation about how phpMyAdmin connects if my host is not willing to enable MySQL in the php.ini file. Would also like to know how to connect via PHP other ways.
"Call to undefined function: mysql_connect() "
Using this code
$DB = mysql_connect('localhost','user','pass')or die("Connect Error: ".mysql_error());
mysql_select_db("mydb" , $DB) or die("Select DB Error: ".mysql_error());