Prev: How to Protect Against SQL Injection Attacks While Using SQLite?
Next: Automatic PHP Security tool
From: Nathan Rixham on 19 May 2010 16:31 Deva wrote: > Hi, > > If I do refresh after submission of a form, records are getting stored > multiple times. > I have two pages. /submission-form/ and /thank-you/ > I was trying header('Location: /thank-you/'); on submission-form page after > successful validation and insertion into db. Still if I do refresh on > thank-you page it adds one more record in database. > How to prevent it without token? if you use POST for the form then the user agent should pop up a nice "do you want to send the data again" type dialogue box. if you add a unique key over a few of the columns then this will prevent duplicates at the table level (regardless of the scenario). to handle POST data, well no point me repeating it, see the spec: http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-09#section-7.5 Best, Nathan
|
Pages: 1 Prev: How to Protect Against SQL Injection Attacks While Using SQLite? Next: Automatic PHP Security tool |