Re: $_SESSION
| From: | John Nichel | Date: | Tue, 20 Jan 2004 20:10:44 +0000 |
| Subject: | Re: $_SESSION | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-175188@lists.php.net to get a copy of this message | ||
Alex Hogan wrote:
I've got a question that I'm sure has a simple answer. Why aren't my session objects transferring across more than one page? I'm calling a session object that was set in the page prior; $_SESSION['mysessionvar'] = $_REQUEST['mytxtobj']; I then assign a variable that value; $myvar = $_SESSION['mysessionvar']; echo $myvar; This displays like I expected. However when I go to the next page and want to display this var again I get either an Undefined index or variable. According to the docs $_SESSION[] is now global and this is the way of setting and retrieving session objects, right? I have tried calling that session object again but it's empty and so is the variable. I thought that the session would stay open until I close the browser and I could return those values any time I wanted. Am I missing something?Are you starting the session on each page? -- By-Tor.com It's all about the Rush http://www.by-tor.com