Re: Error redirect function

From: Date: Thu, 08 Jan 2004 14:10:34 +0000
Subject: Re: Error redirect function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-174048@lists.php.net to get a copy of this message
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


« previous php.general (#174048) next »