Re: Post Variable Problem

From: Date: Fri, 14 Dec 2001 05:41:23 +0000
Subject: Re: Post Variable Problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-77700@lists.php.net to get a copy of this message
You can create a hidden form variable with the value of user to pass with the rest of the post data, or (preferably) you can use: cookies: http://php.he.net/manual/en/function.setcookie.php or, even better, sessions: http://php.he.net/manual/en/ref.session.php Fred Jack <nedcor4@nedcor.com.hk> wrote in message news:20011213074046.10708.qmail@pb1.pair.com... > 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 (#77700) next »