Re: Frames, Sessions and $_POST

From: Date: Wed, 28 Apr 2004 21:28:18 +0000
Subject: Re: Frames, Sessions and $_POST
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-184905@lists.php.net to get a copy of this message
Richard A. Devenezia wrote: > Why doesn't the session array get loaded when session id is passed by > way of $_POST ? > <form name=XYZ method=post target=main action='main.php'> > <input type=hidden name=x value=.> > <input type=hidden name=y value=.> > <input type=hidden name=z value=.> > <input type=hidden name='cesh' value="<?=session_id?>"> > <!-- pass SID in > POST --> </form> Sheesh, never mind. I had the hidden input with the *wrong* name _and_ the *wrong* value. doh!,doh!,doh!. I can put SID in form action, <form name=XYZ method=post target=main action='main.php?<?=SID?>'> <input type=hidden name=x value=.> <input type=hidden name=y value=.> <input type=hidden name=z value=.> </form> or post session info in hidden var <input type=hidden name=<?=session_name()?> value='<?=session_id()?>'> either way, the action script will load up the $_SESSION array properly. -- Richard A. DeVenezia A thorough question can answer itself.

« previous php.general (#184905) next »