Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: multiple forms

  1. #1
    Regular Coder
    Join Date
    Mar 2006
    Posts
    187
    Thanks
    5
    Thanked 0 Times in 0 Posts

    multiple forms

    in php how could i transfer data from several differnet forms on one page. the forms would have different names/ids

  • #2
    Regular Coder
    Join Date
    Jul 2007
    Location
    United Kingdom
    Posts
    159
    Thanks
    2
    Thanked 15 Times in 15 Posts
    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?

    If so, javascript would be more suitable.


    Let me know

    ~Jordan

  • #3
    Regular Coder
    Join Date
    Mar 2006
    Posts
    187
    Thanks
    5
    Thanked 0 Times in 0 Posts
    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?

  • #4
    Regular Coder GO ILLINI's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    634
    Thanks
    0
    Thanked 7 Times in 7 Posts
    Are you going to try to submit both forms at the same time? I don't think you can even do that.

    -Adam
    Why not thank me?

    http://adamsworld.name

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #6
    Regular Coder
    Join Date
    Jul 2007
    Location
    United Kingdom
    Posts
    159
    Thanks
    2
    Thanked 15 Times in 15 Posts
    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!


    ~Jordan


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •