On 2002. szeptember 17. 15:52, Resarch and Development wrote:
> What is the best way to avoid the "repeated comment/post" syndrome
> caused by the user clicking the submit button one too many times
> because he/she did not wait for the browser to return a confirmation
> page or the script took too
The "page" that actually validates the user input and inserts into the
database shouldn't actually be a page that gets sent to the browser -- it
should be a script with no output, which then redirects to a thanks page.
That way there is no chance of the user hitting refresh and double
posting...
> What is the best way to avoid the "repeated comment/post" syndrome
> caused by the user clicking the submit button one too many times
> because he/she did not wait for the browser to return a confirmation
> page or the script took too long to execute.
Along with the other suggestions,
You can
Use some javascritp to blank out the submit button when its clicked. is a
quick and easyway.
Also try storing the sent data in sessions and compairing any new data sent
to the previous data.
John Wards
SportNetwork.net
- Original Message -
From: "Resarch and Development" <[EMAIL PROTECTE
Hi,
> What is the best way to avoid the "repeated comment/post"
> syndrome caused by the user clicking the submit button one
> too many times
The canonical way is to attach a token to the form (a random number will
usually do) and insert that into the table along with the comment/post,
after
5 matches
Mail list logo