RE: [PHP] Re: Error redirect function

From: Date: Thu, 08 Jan 2004 14:33:39 +0000
Subject: RE: [PHP] Re: Error redirect function
Groups: php.general 
Request: Send a blank email to php-general+get-174049@lists.php.net to get a copy of this message
Don't forget to use the '@' before the mysql function so it doesn't show errors... Example: $result=@mysql_query("......"); -----Original Message----- From: Gal [mailto:gal@freeshell.org] Sent: quinta-feira, 8 de Janeiro de 2004 14:11 To: php-general@lists.php.net 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

« previous php.general (#174049) next »