Thanks lance and David for the reply.  :)

Yes, I suspected as much, *BUT* let me explain what I am trying to do:

I have a script I am writing that uses a MySQL backend. I'm including an
initial configuration interface via the webbrowser. During initial
configuration, the user provides parameters for dbhost, dbname, dbpass etc
etc...

If I simply try and connect, and it fails, I don't want my script to error
out, or even display an error... I just want it to move along and let me
deal with informing the user that his database configuration does not work
correctly.

now, to do this, could I do something as simple as:

$conntest = @mysql_connect($dbhost,$dbuser,$dbpass);
if ($conntest == "FALSE") {
            // Do my "Oops didn't work stuff here"
} else {
            // Continue with whatever it was I was doing.
}

would that work as I expect it to?

thanks!

Jason

----- Original Message, by David Robley ----- >
> Trying to connect is usually a good indicator :-)
>
> mysql_connect returns a positive link identifier on success or an error
> message on failure. That should do what you want.
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to