Don't forget to use the '@' before the mysql function so it doesn't show
errors...
Example:
[EMAIL PROTECTED]("......");
-----Original Message-----
From: Gal [mailto:[EMAIL PROTECTED]
Sent: quinta-feira, 8 de Janeiro de 2004 14:11
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Error redirect function
if () // Ok
{
}
else{
Header("Location: ./error.php?iErrorType=1");
die();
}
Doug Parker wrote:
> I have a message board script that requires certain parameters like
> message_id, thread_id, etc. The whole thing works fine, I'd like to
> have a generic error page to default to in the case that someone fools
> with the parameters above - for example, setting the thread id to 400
> when there are only 300 threads. Right now, it just generates the
> mysql error message, which doesn't look nice. I know you can use the
> die() function after the mysql_query function to display some text in
> the case of an error, but I want to go a little further by redirecting
> to an error page. How would I go about doing this?
>
> Any help would be greatly appreciated.
>
> - Doug
>
>
> ------------------------------------------------------------
> http://www.phreshdesign.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php