Sending post variable

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Hi all.

I have a script with a form

<form action="a.php"  ... method="post">
<input name="field" ...>

a.php gets the variable with

$a = $_POST['field'];

How can I send $a to another script via POST?
I have another script that needs some fields using POST.
1) The user sends a form to a.php
2) a.php adds some fields and sends all to another script using POST.

With GET I would get

header('Location: b.php?k=h&newfield=' . $a);

But with POST?

Any ideas?


Re: Sending post variable

On Wed, 11 May 2005 08:38:19 GMT, JGius vs ::NRG::ius wrote:
Quoted text here. Click to load it

Did you try google?! First hit:

Firefox Web Browser - Rediscover the web - /
Thunderbird E-mail and Newsgroups - /

Re: Sending post variable

You would be better to do this with session variables:

Re: Sending post variable

JGius vs ::NRG::ius wrote:
Quoted text here. Click to load it

   As someone already pointed out you can mimic a HTTP POST using PHP.

Quoted text here. Click to load it

   POST redirection can be done with "303 See Other" HTTP status
< ,
*AFAIK*. But, I never got that working.

  <?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com    Blog: /

Site Timeline