glitch13
Jan 29th, 2001, 10:53 AM
I have two problems, both dealing with the same thing, I think theyre pretty common, so there might be some 'canned' solution:
I have a forum system on my site that I wrote, but heres the probs i cant figure out:
1:
Users hitting submit twice when posting (impatient little buggers!), and usually this will result in their post getting submitted twice.
2:
people who post, then out of stupidity, hit the back button to try to edit their post and hit submit again, thus posting an original version and an edited version.
I see that a lot of sites have the page expire on submission to work around the second problem, how do you do that?
as for the first one, my kneejerk reaction is to test the database to see if a record with the exact same content has been posted (excluding the index of course), and if so, dont write it again, but i wanted to check to see if there is a easier way.
thanks in advance!
I have a forum system on my site that I wrote, but heres the probs i cant figure out:
1:
Users hitting submit twice when posting (impatient little buggers!), and usually this will result in their post getting submitted twice.
2:
people who post, then out of stupidity, hit the back button to try to edit their post and hit submit again, thus posting an original version and an edited version.
I see that a lot of sites have the page expire on submission to work around the second problem, how do you do that?
as for the first one, my kneejerk reaction is to test the database to see if a record with the exact same content has been posted (excluding the index of course), and if so, dont write it again, but i wanted to check to see if there is a easier way.
thanks in advance!