note 10857 added to session_register

From: Date: Wed, 24 Jan 2001 09:51:51 +0000
Subject: note 10857 added to session_register
Groups: php.notes 
Request: Send a blank email to php-notes+get-10209@lists.php.net to get a copy of this message
Maybe I am just dense. I just started playing with the joys of sessions about 6 hours ago and couldn't figure out why my session variable wasn't showing up on the next page. I set the variable $name = "mike" and then used session_register("name"); on the first page. Then going to the second page I tried to echo $mike; and got nothing. Well after playing with the .ini file and downloading and installing 4.0.4Pl1 and still getting a blank page I started taking pokes in the dark (well it was dark to me anyway.) Not until I used session_register("name"); on the second page before calling $name did the variable show up. Is this normal or am I missing something? Seems a bit clumsy to have to register the variable on each page. http://www.php.net/manual/en/function.session-register.php

« previous php.notes (#10209) next »