Re: $_POST issues
| From: | Richard Quadling | Date: | Wed, 01 Dec 2010 16:17:22 +0000 |
| Subject: | Re: $_POST issues | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-309795@lists.php.net to get a copy of this message | ||
On 1 December 2010 14:50, Bundhoo M Nadim <nadim@alienworkers.com> wrote:
> Hello,
>
> Can someone explain me what this piece of code basically does ?
>
> <?php
> header("Expires: " . gmdate("D, d M Y H:i:s", time() + (0*60)) .
> "GMT");
> header("Pragma: no-cache");
> print
> "REDIRECT=http://www.domaine.com/page.php?";
> $param = http_build_query($_POST);
> print $param;
> exit(0);
> ?>
>
> Well, the code is redirecting to some page with query string constructed
> using the $_POST data.
>
> My problem is not the redirection; but all I want is to get the data in
> $_POST
>
> If I just put only this piece of code:
>
> <?php
> var_dump($_POST);
> ?>
>
> i get nothing. But the above codes is successfully redirecting me to
> page.php with a properly constructed query string -> which means that $_POST
> was never empty. So why var_dump($_POST) is returning just array(0) { } ???
>
> nadim attari
> alienworkers.com
>
I'd start reading http://docs.php.net/manual/en/reserved.variables.php
--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY