RE: [PHP] Connection error
| From: | David Smith | Date: | Fri, 02 Mar 2001 21:08:32 +0000 |
| Subject: | RE: [PHP] Connection error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-42396@lists.php.net to get a copy of this message | ||
Try this... You need to set a variable for the connection. Also you might
be careful when sending examples of your code as you have given everyone on
this list your username/password to your database.
<?php
$connection = mysql_connect ("localhost", "webmaster2", "******");
if ($connection == false){
echo mysql_errno().": ".mysql_error()."<BR>";
exit;
}
?>
-----Original Message-----
From: Shaohua Qu [mailto:squ@hirons.com]
Sent: Friday, March 02, 2001 4:00 PM
To: php-general@lists.php.net
Subject: [PHP] Connection error
Hi,
When I run the code:
<?php
mysql_connect ("LOCALHOST","webmaster2","*****");
?>
I got error message:
Fatal error: Call to unsupported or undefined function mysql_connect() in
...
HELP!
Thanks in advance,
Sharon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net