[SOLVED] Using $_POST['SponsorName'] for 3rd page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tpendergast
Forum Newbie
Posts: 2
Joined: Thu Jan 15, 2004 10:35 am

[SOLVED] Using $_POST['SponsorName'] for 3rd page

Post 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
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post 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
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post 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&#1111;var1]; ?>">
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

maybe create a session, and store the variables?
tpendergast
Forum Newbie
Posts: 2
Joined: Thu Jan 15, 2004 10:35 am

Thanks

Post by tpendergast »

The input type hidden was the key...

Thanks!!!!!!!
Post Reply