afrausto
Posts: 66
|
| Posted: 08/09/2006, 4:51 PM |
|
Does anyone know how to prevent a person from re-submitting the same form when they use their back button? For example, if I submit a form and re-direct it to a thank you page, if I click on my back button I'm able to re-submit the same form with the same information as before. I would like to prevent a user from doing this. Is it possible?
Thanks for any suggetions.
Albert
|
 |
 |
Waspman
Posts: 948
|
| Posted: 08/09/2006, 11:51 PM |
|
There are lots of ways;
I'd look at sessions that change when a form is submitted or userid compared to current date or formid marked to user table to start with.
But it depends on how you structure app and what its supposed to do.
Tony
_________________
http://www.waspmedia.co.uk |
 |
 |
afrausto
Posts: 66
|
| Posted: 08/10/2006, 8:23 AM |
|
Tony:
I'm using CCS 3.0/ASP/Vbscript with SQL. The form is a grant application that a person fills out and submits. The grant application form is open to the public, so anyone can apply. I want to prevent the person from re-submitting the form more than once.
Thanks
Albert
|
 |
 |
wkempees
Posts: 1679
|
| Posted: 08/10/2006, 9:16 AM |
|
I would check for some identifying objects in the grant application, and base rejection of multiple entries on that.
Of course from here we can not see the data on the form but I am sure some data will be unique, like a combination of
lastname, dateofbirth, city and so on.
In your database you could have a unique id for the grant, and a secondary unique multi part key, containing all of the uniqly identifying (not flying) objects.
The database upon insert will the reject based on duplicate key.
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
lmc
|
| Posted: 08/10/2006, 5:40 PM |
|
Sure, it's called ASP.NET. I think that's where postback came into play
"afrausto" <afrausto@forum.codecharge> wrote in message
news:644da74fa05890@news.codecharge.com...
> Does anyone know how to prevent a person from re-submitting the same form
> when
> they use their back button? For example, if I submit a form and re-direct
> it to
> a thank you page, if I click on my back button I'm able to re-submit the
> same
> form with the same information as before. I would like to prevent a user
> from
> doing this. Is it possible?
>
> Thanks for any suggetions.
>
> Albert
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
DonB
|
| Posted: 08/11/2006, 5:46 AM |
|
I would look at setting the page caching so the page is 'expired' when the
go back to it. This has the added benefit of not retaining a copy of the
page locally where it could be 'sniffed' for sensitive data. Of course, if
it is a secure page (https:) the expired/no-cache behavior is automatically
done for you.
I concur with Walter on having the appropriate database design to prevent
duplicate entries there. Ultiimately, that is the right solution, but
catching it client-side before it's rePOSTed is great if you can do it,
because you prevent those extra hits on the webserver/database.
--
DonB
http://www.gotodon.com/ccbth
"afrausto" <afrausto@forum.codecharge> wrote in message
news:644da74fa05890@news.codecharge.com...
> Does anyone know how to prevent a person from re-submitting the same form
when
> they use their back button? For example, if I submit a form and re-direct
it to
> a thank you page, if I click on my back button I'm able to re-submit the
same
> form with the same information as before. I would like to prevent a user
from
> doing this. Is it possible?
>
> Thanks for any suggetions.
>
> Albert
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
|