Okay, I give up. I can't figure this out. So, instead of spamming the list with my code, I'll ask for help and those who reply I'll send the code to. The problem is as follows:
I'm building a multi page form (called form.php) which 'include's each $step one by one (step1.inc, step2.inc, etc., etc.). That page (form.php) submits to a process script (process.php) which does several things: - checks for each form field to be filled. if a required field is empty, flag $error - if the field is filled, session_register() it. - if there is an $error, resubmit the $step back to form.php - if there is no $error, submit $step+1 to form.php And the whole process gets repeated every time form.php is resubmitted. So, in theory, at the end of the 3 pages that I have, the last submit will cause process.php to grab all the variable/value combinations and (for now) sends me an email. Problems I'm facing: 1) Let's say a user leaves out a field (or more) and submits the page. process.php diligently causes an $error which sends the same $step back to form.php. Now the user fills in what was missing, but DELETES another field and resubmits. At this point, that variable was already registered, and deleting the value from the form has no effect. The old value is still there and gets submitted. I need to check for this somehow. 2) There are also optional fields on the form (thinks like a second field for Address, Telephone#, etc.) These will also need to be registered if they have been filled. And they are. Problem is, sometimes they're not (I can't seem to be able to pin down WHY). 3) If a required field hasn't been filled in the first go around, the whole process gets stuck. In other words, when the same form gets displayed again, and the user DOES fill in that field and resubmits it, it just comes back and says that field is still missing. Even though when I echo that variable prior to the process reaching the point where it checks if there is anything missing, I get a value returned - so the field IS filled. Still, it fails when it reaches the checks. I'm sure there are more, but right now that's what I'm faced with and it's driving me insane. So, if some brave soul out there wishes to read my (no doubt) crappy code and tell me what I did wrong, I'll appreciate it. Please reply to me off-list and I'll give you the current code. -- W | 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. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php