Re: PHP sessions & headers.
| From: | Richard Lynch | Date: | Wed, 20 Dec 2000 23:54:14 +0000 |
| Subject: | Re: PHP sessions & headers. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-31339@lists.php.net to get a copy of this message | ||
> Because session_start() I believe attempts to send a cookie header, all
> headers after this point are defunct, correct?
No. You can send as many headers as your little heart desires. But they
*all* have to come before any content.
You probably can check the value of SID or $PHP_SESSIONID or whatever, and
if it's defined() or set() you know you have a session... Whether it is
still valid or not, depending on your time settings, I'm not so sure about.