Gert,

to prevent PHP to output any error messages, you can prefix the expression
with @, i.e.
$db = @mysql_connect( $host, $user, $password) or die ('Sorry, server is
down!');

Greetings,
Herb

----- Original Message -----
From: "Gert Mellak" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 09, 2002 4:00 PM
Subject: [PHP] error-catching


> Hi!
>
> When I open a database connection and i. e. the db-server is down,
> I get a very long, long error message telling me that the server is down.
>
> What I want to do is just echo a text, i. e. "DB-Server down" and leave
out
> the error message.
>
> Does anyone have an idea how to manage this?




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to