View Full Version : multiple forms
07-28-2007, 09:57 PM
in php how could i transfer data from several differnet forms on one page. the forms would have different names/ids
07-28-2007, 10:05 PM
Can you try be more specific?
Do you want to take data inputted into one form... and get them to show up on a completely different form on the same page?
Let me know :)
07-28-2007, 10:19 PM
sorry, yeah, what i want is a php page structured with four sections, the first two with two differnt forms, the last two with the code to process the forms. is there away to use $_POST to retrieve data from one form if they both have an imput field called name?
07-28-2007, 10:46 PM
Are you going to try to submit both forms at the same time? I don't think you can even do that.
07-28-2007, 10:50 PM
I think it would be better to have 4 different pages, like Step 1, 2, 3 kind of thing. You could use php sessions to keep track of the data as the user navigates across the pages. Another thing you might be able to do is post one form at a time, and store the data in sessions, then after the user fills in the last form process all of the data getting it from the sessions.
07-28-2007, 10:51 PM
As Adam said... if you want to post both forms simultaneously then the code won't know which form's "name" field to acknowledge over the other.
If you can, try give us a real example of what are you are doing... us PHP Coders are pretty good with finding work-arounds for things like this! :)
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.