Avoiding duplicate submissions

Madison Kelly linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Thu Jan 25 02:33:26 UTC 2007


Hi all,

   I am trying to resolve an old problem that I am sure some of you here 
have dealt with.

   I've got a web app (perl+apache+postgres) that, for security reasons, 
only allows cgi variables to be passed as POST (so 
http://foo.com/cgi-bin/app.cgi?var=val&bar=baz fails). So this means all 
data is passed via forms. This may or may not be an issue, I dunno but I 
wanted to mention it.

   So, I tried using a refresh page. When a form was originally 
submitted or edited I would show a screen telling the user the save was 
successful and then refresh to reload the record (with changes applied). 
The problem is, somehow, the cgi variables remain so if a user refreshed 
their browser the data would resubmit. I don't see the cgi variables 
being passed when the refresh page calls the next page, so I am guessing 
it's in the user's browser somewhere. Perhaps not and I missed it?

   So a) can this be fixed and if so, how? Or b) what other scheme could 
I use to prevent duplicate submissions?

Thanks all!

Madi
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list