How to send "post"-variables in a "Location" header
[email protected] (Ajay Garg)
| Newsgroups | php.general |
|---|---|
| Message-ID | <CAHP4M8X1dozDf0mCN2HGieOBzsYd6e=eMTEg=YjwonykojoJKw@mail.gmail.com> |
Hi all.
I have a scenario, wherein I need to do something like this ::
###############################################################
$original_url = "/autologin.php";
$username = "ajay";
$password = "garg";
header('Location: ' . $original_url);
###############################################################
As can be seen, I wish to redirect to the URL "autologin.php".
Additionally, I wish to pass two POST key-value pairs :: "user=ajay" and
"password=garg" (I understand that passing GET key-value pairs is trivial).
Is it even possible?
If yes, I will be grateful if someone could let me know how to redirect to
a URL, passing the POST key-value pairs as necessary.
Looking forward to a reply :)
--
Regards,
Ajay