Re: I want to use POST when redirect via PHP Header function.
| From: | Geoff Lane | Date: | Thu, 30 Jun 2011 07:52:36 +0000 |
| Subject: | Re: I want to use POST when redirect via PHP Header function. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-313821@lists.php.net to get a copy of this message | ||
On Thursday, June 30, 2011, Md Ashickur Rahman Noor wrote:
> I want to use POST when redirect via PHP Header function. Is it
> possible?
AFAICT, it isn't. You can use GET variables by passing them on the
querystring. These can then be accessed via $_REQUEST, which is an
amalgamation of $_POST, $_GET, and $_COOKIE. So if you have a script
that might take input from either $_POST or $_GET, you can usually
code fairly transparently by replacing both by $_REQUEST.
Alternatively, you can create a form on the page and use client-side
javascript to 'auto-submit' via the body onLoad event. However, this
does require JS on the client and so cannot be guaranteed.
HTH,
--
Geoff