Click to See Complete Forum and Search --> : How to check if the form was submitted?


bohdan
03-21-2003, 01:02 PM
Hi,
I need help. I have series of forms and before the user can fill out the next form, I have to make sure they submitted the previous form. I tried cookies but I have problems with that.

Can I create a file on users HD when the Submit button is clicked and then when the next form is attempted to be accessed, make sure that the form was submitted?

My problem is that all the forms will be distributed to users on a CD and only when they click Submit button, the form will go to the server.
Thank you,
Bohdan

Nedals
03-21-2003, 01:30 PM
I tried cookies but I have problems with that.....Cookies sound like a easy solution. What was the problem?
Can I create a file on users HD... That you a CANNOT do.

bohdan
03-21-2003, 01:37 PM
When the user clicks Submit the first form, I write a cookie named "survey1" with a value "completed".
When the user goes to the second form, I check the cookie to make sure it says "completed". When "Submit" is clicked on the second form, I try to write "survey2" and value "completed" but the cookie remains survey1 and the new cookie with name "survey2" is not added.
Thanks for your help.
Bohdan

Nedals
03-21-2003, 01:44 PM
Ah! :)
Cookies are addressed by name and you changed the name.

So rewite your cookie to this..
cookie = "completed=survey1"
and it changes to..
cookie = "completed=survey2"

That should solve it.

bohdan
03-21-2003, 02:55 PM
Thanks a lot!!! I didn't know that. I'll try it tonight and let you know.
Bohdan