0

Is it possible to send post data by a redirect such as header()?

I don't want to just set the $_POST data as a variable and send that, i want it to still be accessible via $_POST but without having to manually submit a form again.

Thanks.

edit* without sessions if possible.

FoxyFish
  • 874
  • 1
  • 12
  • 21
  • No. The redirect is treated as the **response** to the post, it doesn't mean that the client should resend the post. – Barmar Aug 01 '14 at 23:40
  • You could put the post data in a cookie or session variable, and then the new page could get it from there. – Barmar Aug 01 '14 at 23:40
  • yes, i know i could use a session, but i didn't really want to have to, i just thought there maybe a javascript way of auto resubmitting using hidden inputs. – FoxyFish Aug 01 '14 at 23:42
  • http://stackoverflow.com/a/4281937/428980 ? – Malcolm Aug 01 '14 at 23:46
  • Coukd you change the second page so it uses `$_GET` instead of `$_POST`? Then you could redirect to `URL?params` – Barmar Aug 01 '14 at 23:46

0 Answers0