Help with displaying rest of page after MySQL error

From: Date: Sat, 17 Mar 2001 01:12:34 +0000
Subject: Help with displaying rest of page after MySQL error
Groups: php.db 
Request: Send a blank email to php-db+get-7557@lists.php.net to get a copy of this message
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/

« previous php.db (#7557) next »