Re: Help Needed: Sessions

From: Date: Tue, 15 Aug 2000 19:53:25 +0000
Subject: Re: Help Needed: Sessions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-11868@lists.php.net to get a copy of this message
Ben Meyer wrote: > > 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 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net Please correct the line: session_register($UserData); into: session_register("UserData"); and it should work .... cu Martin -- -------------- Martin Neimeier Tel:+49(6262)912344 Fax:+49(6262)912347

« previous php.general (#11868) next »