Re: help



On 5 Jan, 18:06, 6e <aot...@xxxxxxxxxxx> wrote:
Hi!

Please help!!!

Im using php and Im trying to redirect my users to a new page along
with keeping all of the POST variables...


You can't.

In the script which catches the POST you could convert the POST vars
to GET vars and redirect to the URL with a constructed query, or store
the POST vars somewhere in the session. Regardless, the POST will be
empty in the redirected page.

HTTP redirection was never intended for this kind of purpose - even
when its done properly (the header('location....) function returns a
302 response which is completely wrong for this in HTTP/1.1 and even
if you use a 307 redirect it messes up lots of stuff.

Stop trying to fix the wrong problem.

C.
.



Relevant Pages

  • Re: Post with redirect?
    ... How can I force a POST but actually redirect the user as well ... and it can't be done with PHP. ... return $response; ... its a credit card entry form on a completely separate server. ...
    (comp.lang.php)
  • Re: Get http response codes
    ... I have a website in php in which I have some kind of portal to external ... links that come from a database. ... If the response comes back with a 3** redirect, ...
    (comp.lang.php)
  • Redirecting a page during an xmlRequest script
    ... I have a page that sends a request to another PHP page on my site. ... If I try and set the header in the page that is being called, ... it just writes a response to the original page. ... Is there a way that I can redirect from the script that is being called ...
    (comp.lang.php)
  • Re: Post with redirect?
    ... you made it about javascript, ... He wanted a way to redirect a port with data to an external site and I gave it to him. ... And you still haven't showed us how to do a redirect with post values in PHP. ... the only thing jerry got right is that it would be a lot of work. ...
    (comp.lang.php)
  • Re: Post with redirect?
    ... redirection...and how to do a post from php (which you said was ... Oh, so you aren't even as good as a script kiddie, huh? ... I said it was impossible to redirect from PHP. ... Now who's backpeddling, troll? ...
    (comp.lang.php)