Page 1 of 1
$_POST, header()
Posted: Tue Jan 10, 2006 11:40 am
by jonathant
Can you pass $_POST variable data without using a form? Specifically, I am trying to use header("Location:
http://www.domain.com/index.php") to redirect the script, but I need it to hold onto the $_POST data. Is this possible?
Re: $_POST, header()
Posted: Tue Jan 10, 2006 12:42 pm
by pilau
As far as I know, there is no other way. But I don't know much far

Posted: Tue Jan 10, 2006 12:45 pm
by John Cartwright
you can use
cURL to post variables to a page
Posted: Tue Jan 10, 2006 12:45 pm
by RobertPaul
You can do it with 307 Temporary Redirect, but it'll prompt the user if they want to resend the POST data.
Posted: Tue Jan 10, 2006 2:33 pm
by twigletmac
Are you redirecting to a page on your site? If so you could save the $_POST data in a session.
Mac
Posted: Tue Jan 10, 2006 2:49 pm
by jonathant
twigletmac wrote:Are you redirecting to a page on your site? If so you could save the $_POST data in a session.
Mac
Yes, I am redirecting to a page on my site. Is the $_SESSION variable only available in the current script? How could I pass it to the next script that I'm trying to redirect to? Does header() or a similar function support passing data?
Posted: Tue Jan 10, 2006 3:20 pm
by feyd
all your questions are answered by reading about what sessions are and how they work.
http://php.net/session
Posted: Tue Jan 10, 2006 4:31 pm
by jonathant
wow, sessions are neato!!