Posted by Erwin Moller on 12/04/06 14:49
Erwin Moller wrote:
> Nico wrote:
>
>> Dear All,
>>
>> I'm new in the Php world and am trying to do my first trials (with
>> included errors :).
>> At the present I created a simple form:
>>
>> <FORM METHOD="POST" ACTION="test.php">
>> <INPUT TYPE="text" NAME="amount" SIZE="10" MAXLENGHT="20">
>> <INPUT TYPE="SUBMIT" VALUE="SUBMIT">
>> </FORM>
>>
>> Then, in the test.php page I've included the following code:
>> <?php
>> echo $_REQUEST["amount"];
One more remark: Avoid the use of $_REQUEST.
Use $_POST or $_GET or $_COOKIE instead.
The use of $_REQUEST mainly shows to others you don't know where to expect
the data. :-)
(In this case you need $_POST, since the 'method' of your form is post.)
Regards,
Erwin Moller
[Back to original message]
|