Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199903

Re: [PHP3] SetCookie() doesn't set if using Header() after it. From: Alan Wicks (aswicks <email protected>)
Date: 03/23/99

Greetings Daevid,
If I understand the recent missives, the HEADER() has to
come first with no comments or anything else before or above
it.
Alan S. Wicks
------------
Daevid Vincent wrote:
>
> Am I not understanding something about headers/cookies?
> The cookie below does NOT get set if I use the Header() line too.
> If I comment out the Header(), then it works fine. (but I don't switch pages
> obviously).
>
> // Set a cookie for later retrieval and usage.
> SetCookie("myID",$current_id,time()+3000);
>
> // shove them back to the thankyou page.
> Header("Location: ./thanks.html\n\n");
>
> Do I need a "wait" or something between them?
>
> Daevid Vincent.
>
> --
> PHP 3 Mailing List http://www.php.net/
> To unsubscribe send an empty message to php3-unsubscribe <email protected>
> To subscribe to the digest list: php3-digest-subscribe <email protected>
> For help: php3-help <email protected> Archive: http://www.php.net/mailsearch.php3
> List administrator: zeev-list-admin <email protected>

--
PHP 3 Mailing List   http://www.php.net/
To unsubscribe send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest list:  php3-digest-subscribe <email protected>
For help: php3-help <email protected>  Archive:  http://www.php.net/mailsearch.php3
List administrator:  zeev-list-admin <email protected>