Re: Re: can not get variable value from HTML form
| From: | joe at traptfans dot com | Date: | Mon, 20 Oct 2003 21:22:28 +0000 |
| Subject: | Re: Re: can not get variable value from HTML form | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-21839@lists.php.net to get a copy of this message | ||
instead of using $username use $_POST['username'] sounds to me like
you have register globals off on your devel machine and turned on on
your production machine... From what i am told it is best to develop
with register globals OFF i always config my php to have that off.
Joe
On Wed, 31 Dec 1969 16:00:00 0000 (), awscrib@earthlink.net wrote:
>
>look at this
><a target=_blank
>href="http://www.php.net/manual/en/security.registerglobals.php">http://www.php.net/manual/en/security.registerglobals.php</a>
>
>"Emmy Chen" <echen@kuaitech.com> wrote in message
>news:004501c3019a$bc1749a0$6501a8c0@Kuaitech...
>> I DON'T have this problem with my development machine until I deploy the
>> code to the production.
>>
>> I am using window XP home edition. I tried both apache-2.0.45 and
>> apache -1.3.27 with both php-4.3.1 and php-4.3.2. and none of them
>works.
>>
>> the phpinfo(); works fine without any problem.
>>
>> but I could not get the variable value from the html FORM.
>>
>> the test program is, the link is <a target=_blank
>href="http://www.kuaitech.com/test.php">http://www.kuaitech.com/test.php</a>
>>
>> <HTML>
>> <?php
>> $user="GUEST";
>> echo ($user);
>> ?>
>> <FORM>
>> Please type your name: <BR>
>> <INPUT TYPE=TEXT NAME="username"><BR><BR>
>> <INPUT TYPE=SUBMIT VALUE="Submit">
>> </FORM>
>> You typed:
>> <?php
>> echo ($username);
>> ?>
>> </HTML>
>>
>> As you can see, I can get the value for $user which is defined within
>the
>> php code, but I can not get the value for $username from html form.
>>
>> Many thanks.
>>
>> Emmy
>>