note 30105 added to function.session-name
| From: | acsguy at wtp dot net | Date: | Thu, 06 Mar 2003 14:38:01 +0000 |
| Subject: | note 30105 added to function.session-name | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-44942@lists.php.net to get a copy of this message | ||
You cannot have spaces in the name of a session. If you use spaces in your name, there will be a
new session each time the page loads instead of the expected behavior of using the same session each
time. If you use a varaible to store the name and allow visitors to influence that name, you might
want to do it this way....
session_name(str_replace(" ", "_", $sitename));
session_start();
FYI
--
http://www.php.net/manual/en/function.session-name.php
http://master.php.net/manage/user-notes.php?action=edit+30105
http://master.php.net/manage/user-notes.php?action=delete+30105
http://master.php.net/manage/user-notes.php?action=reject+30105