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

From: Date: Mon, 24 Sep 2001 16:11:15 +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-68546@lists.php.net to get a copy of this message
on 9/24/01 10:56 AM, Thomas Deliduka at thomas@neweve.com wrote: > <FORM ACTION="index2.php" METHOD="POST"> > VAR 3: <INPUT TYPE=TEXT VALUE="My Var 3" NAME="myvar3"> <INPUT > TYPE=SUBMIT > VALUE="go"><BR> > </FORM> > 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 Matt _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com

« previous php.general (#68546) next »