I'm trying to build a multi-step form and using sessions to register the field values, but having serious issues. This is what I'd like to do:

step 1 (first page): ask for name, address, email. [submit]
step 2 (second page): ask for more personal information [submit]
step 3 (last page): ask for specific event information [submit]
send everything to a back end MySQL db, and redirect to a thank you page.

This whole process is just one form.php file that posts to a process.php script. The content of form.php gets changed based on the step# (they get included step1.inc, step2.inc, and step3.inc.)

However, after each [submit] I would like to verify the data prior to continuing to the next page. If any of the fields are missing or incorrect, we re-post the same page with the correct fields already filled in (based on whatever the user entered), and the missing one ... blank (obviously.) But, if everything is okay, and all fields check out, register the values and go on to the next page. Repeat the process.

I'm having a heck of a time with the validation part. Either things don't register, or it gets stuck in a loop, regardless of what I change after the re-post. So, I need some help. I need some code...help!

--
M | I haven't lost my mind; it's backed up on tape somewhere.
 +--------------------------------------------------------------------
 Ashley M. Kirchner <mailto:[EMAIL PROTECTED]>   .   303.442.6410 x130
 IT Director / SysAdmin / WebSmith             .     800.441.3873 x130
 Photo Craft Laboratories, Inc.            .     3550 Arapahoe Ave. #6
 http://www.pcraft.com ..... .  .    .       Boulder, CO 80303, U.S.A.


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to