RE: [PHP] Passing POST variables w/out a FORM submit
| From: | Chris W. Parker | Date: | Thu, 13 Nov 2003 22:01:09 +0000 |
| Subject: | RE: [PHP] Passing POST variables w/out a FORM submit | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-169593@lists.php.net to get a copy of this message | ||
Chris Shiflett <mailto:shiflett@php.net>
on Thursday, November 13, 2003 1:41 PM said:
> http://shiflett.org/hacks/php/http_post
Ok I don't think this can be used in conjuction with a redirect but I'd
like to find out. Here is some code I wrote up quick (and didn't test).
What I'd like to happen (as well as a million other people???) is I POST
the data back to the previous page and then redirect to that page having
access to all the data I just POSTed.
<?php
$postdata = "the data goes here";
$website = "http://some.website.com";
$path = "/page.php";
$redirect = $website.$path;
http_post($website, $path, $postdata);
header("Location: $redirect"); exit;
?>
Worky? No worky?
Chris.
--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/