Jump to content

[SOLVED] How do I retrieve my form $_POST[] on multiple pages


xodus1

Recommended Posts

Hi Guys,

 

I'm new to PHP and need help with passing variables from my form to multiple pages. I have global registers turned to off.

 

I am able to retrieve my form inputs on the second page.. however unable to retrieve the same on the other pages after.

 

for example -

 

form.php - my form page input - $_POST['startdate']

action.php - I'm able to retrieve - $_POST['startdate']

 

action2.php - I have a link on action.php which then redirects to this page; again requires - $_POST['startdate'] - doesn't work ... :-[

 

Any experts out there??

 

 

 

 

You need to start a session and save the variables as a session. For more information read this.

 

http://us2.php.net/manual/en/book.session.php

 

P.S. You can also save the variables in a database and then retrieve them as well. Post was built to only pass to the next page in which you told your form to go to.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.