RE: [PHP] Need Redirection Trick...

From: Date: Fri, 06 Dec 2002 06:39:34 +0000
Subject: RE: [PHP] Need Redirection Trick...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-127226@lists.php.net to get a copy of this message
Great Jason, thanks a lot. I was just looking for some direction and I think you just helped me find it. Thanks for taking the time to look at my problem. :) - Nilaab > -----Original Message----- > From: Jason Wong [mailto:php-general@gremlins.biz] > Sent: Thursday, December 05, 2002 11:46 PM > To: php-general@lists.php.net > Subject: Re: [PHP] Need Redirection Trick... > > > On Friday 06 December 2002 11:35, superbus22@attbi.com wrote: > > Hello Everyone, > > [lots of irrelevant stuff snipped] > > > The second thing that should happen is that if there are actually no > > subcategories for the selected category then subcat_id should > equal 0 and > > the script should redirect back to the same page with the GET > variables of > > cat_id and subcat_id (which is equal to zero at this point). > The problem is > > that I cannot redirect with a header() function because content > is already > > sent to the browser at the beginning of the script (the list of > > categories). Is there any other way that I can redirect and send the > > variables of cat_id and subcat_id to the page in the second situation > > mentioned earlier? Register Globals is on. > > 1) BEFORE you output anything make your check whether you need to > redirect. > After all, if you're going to be redirecting, why output anything at all? > > or > > 2) Use the output buffering functions. > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > Do not drink coffee in early A.M. It will keep you awake until noon. > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#127226) next »