Hi there guys,
Well, I've created such a convoluted mess, that I believe that I could win an award for incompetent coder of the decade or something.
First, my intention:
I wanted the user to submit the form. I wanted a verification process that would check certain fields and stop the user for correction. After the required fields were fixed, it would then allow the user to submit.
My problem: I have created an endless loop. If I fix one value, upon submission, a value that I fixed earlier is forgotten and the submission code shows back up again as if it was never fixed. I know that it's because of a situation I'm not checking for, but to be honest, my code seems so nasty, that I'm sure this can't possibly be the way I'm supposed to be doing this.
What I tried:
I tried to switch the POST values to SESSION values if they didn't need to be modified, then attempted to fix the required values, and move them to SESSION values only when the user successfully input the data.
What I need to do:
I need to be able to store the data once it's correct and make the script understand that it doesn't need to be checked anymore once it's been submitted correctly once.
Here's my code:
txt file
Here's the actual page(leave the radio boxes unchecked to see my problem).
script
Check "I agree" to get the submit button.
Aside from giving everyone a good laugh, I hope someone can help me figure out how to write a competent verification process.
thanks,
json