note 14282 added to ref.session.php
| From: | yugin at eudoramail dot com | Date: | Wed, 25 Jul 2001 03:58:56 +0000 |
| Subject: | note 14282 added to ref.session.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-15805@lists.php.net to get a copy of this message | ||
I've done some investigations on sessions and read comments by other readers. Here are some
conclusions (based on PHP 4.0.4 p11):
- always call session_start() first as it sends headers for cookies. You need to do this even
before calling session_destroy().
- check if a variable is registered using session_is_registered() before using it.
- using session_id() to get the session id is more reliable than using the $PHPSESSID variable.
http://www.php.net/manual/en/ref.session.php