Help Needed: Sessions
| From: | Ben Meyer | Date: | Tue, 15 Aug 2000 14:22:42 +0000 |
| Subject: | Help Needed: Sessions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-11809@lists.php.net to get a copy of this message | ||
I am having a couple problems with sessions.
I am allowing PHP to record the session information as defaulted to cookies.
At the same time I am recording the SessionID and other information to the
database when the user logs in. I am also storing some of this data in a
session variable called $UserData that is arrayed into the variables I need
to pass. Here's a sample of my logon:
session_start();
session_name("my_session_name");
session_register($UserData);
$UserData["SessionID"] = session_id();
$UserData["SessionName"] = session_name();
PHP_SESSION_RECORD("LOGON"); //This is the function that I use to record the
information to the database.
Now my problem comes in in that the $UserData is not being saved. I cannot
access the information stored in $UserData[] on other pages of the session.
It is not unregistered until the user goes to the Logout page.
Help is greatly and urgently needed.
Thank you in advance.
Benjamen R. Meyer