Session Code debug help requested

From: Date: Wed, 31 Jan 2001 16:12:18 +0000
Subject: Session Code debug help requested
Groups: php.general 
Request: Send a blank email to php-general+get-37496@lists.php.net to get a copy of this message
Hello all. Sorry, I know sessions come up a lot. I am attempting to use sessions for login tracking. The session starts fine, sends the cookie fine(login as the session name), registers login as a session var, then location should switch to index. all my files except login include() a file called header.php which if login is not registered redirects to login. Except login is never registered when it hits header. The code I use to initialize the session is below. Also, no data is saved in /tmp as it should be. I missed something. I just can't figure out what. :( Any help would be appreciated. Thanks in advance. ---Matt if ($success) { //set the session name to the login, start the session, register the login in the session //destroy any old data @session_destroy(); session_name($login); session_start(); session_register("login"); header ("Location: index.php"); exit; }

« previous php.general (#37496) next »