on 04/01/03 7:26 PM, OrangeHairedBoy ([EMAIL PROTECTED]) wrote:

> Hi all,
> 
> It seems that there might be some basic solution on this that I never
> received a memo on...

it's been mentioned MANY times on the list in the last week :)
 
> Basically, I'm looking for a way to avoid repeat posts. If someone, for
> example, adds something to a bulletin board, clicks submit, and then presses
> F5, they're just 1 click away from re-submitting the form and posting the
> same information for a second time. Is there an easy way to avoid this?

when "generating" the form, include a hidden field which has a unique,
random value.

then the script that recieves/validated the post should check that the value
doesn't already exist in the database before inserting... the only way
someone can double-post is by actually refreshing the form (thus getting a
new hidden field.

 
> I've thought about using a "unique visit id" or something which gets
> triggered when a visitor posts, but that seems like a lot to do...
> 
> Also, do you think I should look into redirecting the user once they've
> posted so they can't go back?

they can still go "back" after a redirect... it's just pages in the browser
cache...


Justin French


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to