This is a discussion on Sending post variable within the PHP Language forums, part of the PHP Programming Forums category; Hi all. I have a script with a form <form action="a.php" ... method="post"&...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi all.
I have a script with a form <form action="a.php" ... method="post"> <input name="field" ...> </form> 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? G. |
|
|||
|
On Wed, 11 May 2005 08:38:19 GMT, J˙Giusł vs ::NRG::ius wrote:
> How can I send $a to another script via POST? Did you try google?! First hit: http://www.alt-php-faq.org/local/55/#id55 -- Firefox Web Browser - Rediscover the web - http://getffox.com/ Thunderbird E-mail and Newsgroups - http://gettbird.com/ |
|
|||
|
|
|
|||
|
J˙Giusł vs ::NRG::ius wrote:
<snip> > How can I send $a to another script via POST? As someone already pointed out you can mimic a HTTP POST using PHP. > With GET I would get > > header('Location: b.php?k=h&newfield=' . $a); > > But with POST? POST redirection can be done with "303 See Other" HTTP status <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#c111577953637573243>, *AFAIK*. But, I never got that working. -- <?php echo 'Just another PHP saint'; ?> Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/ |