database conection (newby)
| From: | Tommy Straetemans | Date: | Thu, 29 Nov 2001 14:52:23 +0000 |
| Subject: | database conection (newby) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-76038@lists.php.net to get a copy of this message | ||
Hi
I'am totaly new in php i work always with asp.
I give the folowing hidden fields to a php script
<input type=hidden name=connectie value="mysqlhost.mijndomein.be:3306">
<input type=hidden name=uid value="U0498526">
<input type=hidden name=pwd value="iwinfo59">
<input type=hidden name=database value="D0498526">
and in my php script i try to make my connection as follows:
$conn = mysql_connect('%s','%s','%s',$connectie,$uid,$pwd);
mysql_select_db('%s',$database,$conn);
but i keep getting this error:
Warning: Wrong parameter count for mysql_connect() in
/home/users/mijndomein.be/admin/x.php on line 27
What do i wrong or is there a method to make my connection with a include
file?
Tommy Straetemans