Re: Question: Passing error messages

From: Date: Sat, 06 Nov 2004 16:52:38 +0000
Subject: Re: Question: Passing error messages
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-201368@lists.php.net to get a copy of this message
Stuart Felenstein wrote:
I've started getting into the habit of passing error messages through session variables, particularly on redirects. From some peoples reaction on this list I gather it's not the best practice. What is an alternative way ? I believe it's through a URL. not sure how to go about that method Stuart
I'm not quite getting what you're saying - are you sending the error messages on to a new page?! The usual and simple way of doing this is the good 'ol OR operator: do_something() or die('Couldn\'t do it, sorry...'); Well, maybe an IF then: if (!do_something()) { exit('Still can\' do it...'); } But there are also much more sophisticated ways of doing it. Clarify exactly what you're trying to do, and we'll get back to them. -- Daniel Schierbeck Help spread Firefox (www.getfirefox.com): http://www.spreadfirefox.com/?q=user/register&r=6584

« previous php.general (#201368) next »