RE: [PHP] Re: How can I redirect to another php page

From: Date: Fri, 10 Jan 2003 12:05:50 +0000
Subject: RE: [PHP] Re: How can I redirect to another php page
Groups: php.general 
Request: Send a blank email to php-general+get-131097@lists.php.net to get a copy of this message
> -----Original Message----- > From: Jason Sheets [mailto:jsheets@shadotech.com] > Sent: 10 January 2003 02:25 > > You should always use the exit after a redirect, the browser is not > required to go to the new location. > > If you do not exit your script after you redirect and the browser does > not go to the new location you risk the unintended continued execution > of your script. That's good advice, but the explanation is not quite accurate. If you do not exit your script after a redirect, the remainder *will* be executed and any output it generates sent to the browser. However, if the browser obeys the redirect, it will simply ignore the output you sent, and never display it -- so you've just wasted bandwidth transmitting it! Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: m.ford@lmu.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

« previous php.general (#131097) next »