Hi all,
I was wondering is it possible to send all the variables within a form to another page just before using the redirection command in PHP, i.e. header("Location:address.php"). I know by posting or getting in forms is the easiest way but is the way i described possible?
thanks for ur time,
Jos
sending variables before a redirect??
Moderator: General Moderators
Good question. I never did get to the bottom of that issue so i just used html meta tags to do my refreshing.
I don't like the fact that header() doesn't have a delay like the meta tag does. Hopefully it will in a later release of php.
Code: Select all
<meta http-equiv="refresh" content="5; url=page.php">header() is a a function that outputs data in the http header which is always sent before any content, so there is no way you can force a delay after page content is output by manipulating any headers..
Doing an 'invisible' post or get to another page behind the sceenes is possible with curl or standard (http) file functions, if you just want to pass the data on to the redirected page you can do that either by urlencoded data in the new url (get) or by creating a session and storing the data in it..
Doing an 'invisible' post or get to another page behind the sceenes is possible with curl or standard (http) file functions, if you just want to pass the data on to the redirected page you can do that either by urlencoded data in the new url (get) or by creating a session and storing the data in it..
I know all that, what i was getting at with my bitching was the fact that they should, along with the already existing header("location: http://blah.com"), a new built in function that works similar to the HTML meta refresh. But this new one let's the page load instead transport a user before.Stoker wrote:header() is a a function that outputs data in the http header which is always sent before any content, so there is no way you can force a delay after page content is output by manipulating any headers..