Re: super simple....... but!
| From: | olinux | Date: | Sun, 22 Apr 2001 02:42:04 +0000 |
| Subject: | Re: super simple....... but! | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-8775@lists.php.net to get a copy of this message | ||
mysql_connect returns a positive MySQL link identifier on success, or an
error message on failure.
You are testing for True/False
a better way to do your test would be
$link = mysql_connect ("localhost", "username", "password") or die
("Could
not connect");
print ("Connection successful!");
olinux
----- Original Message -----
From: "Francois Boucher" <franky@iname.com>
To: <php-db@lists.php.net>
Sent: Saturday, April 21, 2001 1:34 PM
Subject: [PHP-DB] super simple....... but!
> I wrote this code but nothing append. If i look de code in the browser
it's
> stopping to starting!
>
> What is the problème?
>
>
> <HTML><BODY>
> <?php
> echo "starting...";
> if ( mysql_connect("localhost","php","php") )
> { echo "ok"; }
> else
> echo "error!";
>
> ?>
> </BODY></HTML>
>
> --
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> -= François Boucher =-
> -= franky@iname.com =-
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com