Page 1 of 1
[SOLVED] Using $_POST['SponsorName'] for 3rd page
Posted: Thu Jan 15, 2004 10:35 am
by tpendergast
Hi, I'm new to PHP and I'm having trouble getting my variables to work correctly on my 3rd page. First page is a form that where the user inputs information. Second page displays the info for verification via echo $_POST ['vairable name']. The third page is supposed to perform the 'insert into' my database. The problem is that the variables are all undefined when the get posted to page 3.
What am I missing here?
Tom
Posted: Thu Jan 15, 2004 10:54 am
by JayBird
show us the code for the 3 pages.
There are a number of ways you could solve the problem. One is to store all the values in hidden form fields on the second page, then subit them to the third page.
But, if you show us you, a more suitable solution may be apparent.
Mark
Posted: Thu Jan 15, 2004 11:05 am
by kettle_drum
If its three pages then you must remember to make the second page send the info entered on the first page to the third. I.e. there needs to be a form on the second page that passes the variables entered from the first page via a hidden form or other method.
Code: Select all
<input type="hidden" name="var1" value="<?php echo $_POSTїvar1]; ?>">
Posted: Thu Jan 15, 2004 11:09 am
by vigge89
maybe create a session, and store the variables?
Thanks
Posted: Thu Jan 15, 2004 11:09 am
by tpendergast
The input type hidden was the key...
Thanks!!!!!!!