...

View Full Version : Poll - Submit once



signal
07-10-2003, 09:28 AM
I am putting an opinion poll on a site which I am hoping to set up as a form since the results will not be published immediately. Is there any way to ensure that the form will only be able to be submitted once (possibly using cookies?).

I don't have any experience of ASP or PHP etc so ideally, I would like a javascript solution if possible.

I'd be very grateaful for any sugestions.

ellisd5
07-10-2003, 11:31 AM
Yea you can create a cookie to store weather the form has already been submited. Of course anyone can delete cookies so if they do then they can do the poll again

I would not have a submit button rather a normal button calling a js function.



function submitFunction () {
//create cookie
...
...
...
document.myform,submit();
}


You would then have to check to see if theres a cookie to detainmie weather ot not to show the form or not.

You say say that you dont know asp or php etc.... but you will need some serverside language to store you results.

signal
07-10-2003, 03:18 PM
Thanks hharchester.

My plan is to process the form with form mail and sort the results manually for now as I expect the volume to be low enough. If the response is better than expected, I will be able to justify a mail package such as Multicity.com's one which seems quite good.

Thanks for the code. I am going to look at the cookies option some more and will hopefully solve it.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum