Re: Post Variable Problem

From: Date: Fri, 14 Dec 2001 05:34:35 +0000
Subject: Re: Post Variable Problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-77701@lists.php.net to get a copy of this message
Just have a hidden field in your "Choose" form named user <input type="hidden" name="user" value="<?=$user?>"> That should take care of it Rick > Dear all > I had a Form Called Login.php, this form will pass the login Username to > Main.php. > > For the Main.php i create a form for user to choose what they want to do > from the List/Menu. Once they had select the choose and press the Option, > the value of the Selected choose will pass back to Main.php to perform some > task. > > The step is when Login.php had submitted , the Username ($user) is passed to > Main.php, so in Main.php i had a script > <? > print ("Hello!$user"); > ?> > and the below i had a List Select Menu which let user to Choose what they > want to do. Once they selected , press the Submit button, the form will pass > back to itself! which is "Post=$php_self"". here the problem appear, once it > post back the value to itself, the $user will be gone, which i understand > why, but is there anyway that once the $user had passed to main.php, the > $user's variable will be hold constant in main.php? > > I really waiting for your help! > > Jack > jack@nedcorc.com

« previous php.general (#77701) next »