note 14703 added to function.mysql-connect.php
| From: | webmaster at neweconomist dot de | Date: | Fri, 10 Aug 2001 11:18:40 +0000 |
| Subject: | note 14703 added to function.mysql-connect.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-16537@lists.php.net to get a copy of this message | ||
Does anyone have an idea how to connect to an remote mysql server via php?
-------------------------------------
What is wrong with this script?
$link = mysql_connect($dbServer, $dbUser, $dbPass) or die ("Could not connect");
print ("Connected successfully");
mysql_select_db($dbName, $link) or die ("Could not select DB: ".$dbName);
mysql_close ($link);
----------------------------
Though the permissions for $dbUser is granted to @% and the connection is successfully, I just
cannot select any database table!
Thanks for your help!
http://www.php.net/manual/en/function.mysql-connect.php