SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Git-R-Done
    Join Date
    Nov 2001
    Posts
    1,194
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need Help With a Form

    I've been trying to do this myself for the past couple of hours but I cannot figure it out. It seems so simple but I just keep messing up.

    I am trying to make a form that spans on the same page, but shows up seperately in between clicking submit. The first form has two values. If the visitor fills them out correctly, it goes to the next step of the form (that shows a new form on teh same page), but if they don't submit the info correctly it will show the error and the same form below.

    Once the values are correctly submitted on the first form, the second form will show and do the same thing. After everything is successfully submitted, the results are emailed to me.

    I understand how to do the error checking and emailing, but I can't figure out how to save the values from the first form over to the second (sessions?) and also show one form (with or without the error results) then show the next form (with or without error results).

    Any help would be greatly appreciated. I just need a basic example of if statements and I could figure the rest out.
    John Saunders

  2. #2
    Fully Sweet Car noddy's Avatar
    Join Date
    Aug 2002
    Location
    Perth, Western Australia
    Posts
    759
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    post some code coz without it its like being blind

  3. #3
    Ceci n'est pas Zoef Zoef's Avatar
    Join Date
    Nov 2002
    Location
    Malta
    Posts
    1,111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm with noddy on this, show us some code.

    However...

    Maybe one trick you could use is to have a hidden field with the same name on each form (eg: call it 'trigger' and give it the value 'step1' on the first form and 'step2' on the second form), then to figure out which form has been submitted, you just check that value.

    To save the values of the first form over to the second, just use the posted variables, if you don't want to show them, put them in a hidden field.

    Rik
    English tea - Italian coffee - Maltese wine - Belgian beer - French Cognac


Bookmarks

Posting Permissions

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