This has to be a basic question but I can't find it
answered anywhere; I'm probably not searching for the
right words or something.

I have a page that inserts some MySQL search results
in the middle of the page. My web hosting provider's
MySQL uptime is spotty. I'd like the rest of the page
to load if any of the calls to the database fails.

My first line of PHP code (embedded in HTML) has:

$db = mysql_connect("x","y","z") or
die("saysomethinghere");

If I have a connection problem, it does print the
"die" message and the connection error, but it also
stops the page right there: no more HTML is displayed.

I know about suppressing the error message with "@"
but this wouldn't seem to help this problem.

Do I need something to exit the embedded PHP and
continue on with the following HTML if $db ==
"" ?

Thanks.


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

-- 
PHP Database 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