Re: cookies and redirection
| From: | Chris Shiflett | Date: | Wed, 13 Aug 2003 20:31:36 +0000 |
| Subject: | Re: cookies and redirection | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-159488@lists.php.net to get a copy of this message | ||
--- Chris Boget <chris@wild.net> wrote:
> You can't use any functions that send headers to the browser (and
> that includes setcookie()) before you use:
>
> header( 'location: http://blah' );
>
> The browser will choke.
I'm not sure what gave you this idea, but this is false. What browser were you
using that "choked", and what does that mean exactly?
Use this sample code:
header('Foo: Bar');
header('Location: http://www.google.com/');
Chris
=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/