Re: Sessions just don't work on my machine. (Trying this again)

From: Date: Mon, 24 Sep 2001 16:15:11 +0000
Subject: Re: Sessions just don't work on my machine. (Trying this again)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-68550@lists.php.net to get a copy of this message
I see I'm relying on cookies in my code. Lemme see if I can pass it. Thanks. On 9/24/2001 12:11 PM this was written: > I dont see where the SID is being passed to the next page. I recently > struggled through getting sessions to work, and for me I had to send SID > myself manually, the server wouldn't send it via a cookie. > > > I have mine set up a little differently, something like > > ------------ > > //index.php > <?php > session_register("var1"); > session_register("var2"); > $var1 = "the session..."; > $var2 = "worked"; > ?> > <html> > <body> > <a href="index2.php?<?=SID?>">Go to page two</a> > </body> > </html> > > //index2.php > <?php > session_start(); > > echo "var1 is $var1 and var2 is $var2"; > > session_destroy(); > ?> > > ----------- > > You can also send the SID in a form via > <form method="post" action="nextpage.php?<?=SID?>"> > > > I use the constant SID and the shorthand <?=SID?> because that is what is > recommended and demonstrated on php.net -- Thomas Deliduka IT Manager ------------------------- New Eve Media The Solution To Your Internet Angst http://www.neweve.com/

« previous php.general (#68550) next »