Your POST variables should be preserved if you use header() to redirect to a different page; Location sends the browser a 302 moved permanently response code.
If that doesn't work, you could try sending a 307 moved temporarily http response:
header("HTTP/1.0 307 Temporary redirect");
header("Location:page2.php");
leila
2016-05-20 02:43:05 UTC
Use an When you submit the original form the form's action should be set to email.php and in that page you must have the hidden input so it records the post data so it can be re posted when the email form is submitted.
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.