• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Is there a way to prevent queries from submitting again on a reload?

Magic2K2

New Member
I cannot allow people to reload a page and submit their query again as if it were an INSERT or UPDATE it would throw my database all out of wack. Is there an easy way to do this w/o having to use code to check in every PHP script I want to protect against this?
 
you'll need to do something at the server end to stop re-submissions.

or do you mean when people refresh the 'results' page that that is resubmitting. If that's the case use a redirect like on this forum.
 
You could make it a hard way, generate a big random number and than make the script ignore a submission of an already handled number.. this may not be a great sollution, but it's a possible one tho.

Jome
 
Originally posted by Jome
You could make it a hard way, generate a big random number and than make the script ignore a submission of an already handled number.. this may not be a great sollution, but it's a possible one tho.

Jome

I like that. I'll see if I can get that to work.
 
Back
Top