more easy questions but getting there.
| From: | Matthew Darcy | Date: | Wed, 23 Jan 2002 16:47:06 +0000 |
| Subject: | more easy questions but getting there. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-81709@lists.php.net to get a copy of this message | ||
Hello again.
Second post of the day.
I have got the table html page and the database commit php script sorted no
problem.
I in my main php script I have included a script called dbconnect.php
this contains
mysql_connect("localhost", "$user", "$passwd") or
die ("Error could not connect to MySql Server - connnection not
possible
");
mysql_select_db("$database") or
die ("Could not start session with database ");
I have put the username and password in the $user and $passwd I just
withheld them for the sake of this mail.
When I run my main php script it creates the form without a problem, but
just before the form the lines
mysql_connect("localhost", "$user", "$passwd") or die ("Error
could not
connect to MySql Server - connnection not possible");
mysql_select_db("$database") or die ("Could not start session with database
");
I have tested the user $user and $password and it connects fine from mysql
and I can run selects without problem. Can someone give my php the once over
and see if there is an error in the connection string.
Thanks,
Matt.