Re: POST Method



Erwin Moller wrote:

> FF wrote:
>
>> Hello
>>
>> I would like send variable to php script from URL
>> using POST method. Is possible do it ?
>> ( <a href="xxx.php">)
>>
>
> Hi,
>
> I am not sure what you mean, but is this helping?
>
> make URL (with Javascript or whatever)
> xxx.php?name=FF&number=42
>
>
> from xxx.php:
>
> $passedName = $_GET["name"];
> $passedNumber = $_GET["number"];
>


Or alternatively, with POST:

<form action="xxx.php" Method=:post">
<input type="text" name="name">
<input type="text" name="number">
<input type="submit">
</form>

and in xxx.php you retrieve them:

$passedName = $_POST["name"];
$passedNumber = $_POST["number"];


Regards,
Erwin Moller
.



Relevant Pages

  • Re: POST Method
    ... > I would like send variable to php script from URL ... > using POST method. ... Erwin Moller ... Prev by Date: ...
    (comp.lang.php)
  • Re: allow users to update their own info in a MySQL db
    ... members a way to view and update their own contact information, ... I assume the safest/smartest way is via the php script checking the user/pwd of the form submitter to determine if the update query should be allowed ... Erwin Moller ...
    (comp.lang.php)
  • Re: PHP 4.2.2 and php://stdin
    ... Erwin Moller wrote: ... >>shoves them in a MySQL database. ... >>I created the following php script to test it: ... php://input allows you to read raw POST data. ...
    (comp.lang.php)
  • Re: mkdir in a 755 dir
    ... Erwin Moller wrote: ... > When you run a PHP script, that script runs almost in all cases as user ... > APACHE, often called: ... > give the group writepermission. ...
    (comp.lang.php)
  • PHP: remote file open problem
    ... But my PHP script gives the error: ... I cannot use the POST method in HTML is because my webhost supports only GET method. ... $Filename = stripslashes; ...
    (php.general)