SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Dupicates

  1. #1
    SitePoint Zealot
    Join Date
    Mar 2003
    Location
    scarborough
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Dupicates

    I seem to be getting duplicates into my databases. I do not know why. Perhaps if someone hit the back button they enter a set of values twice. How could I stop this happening... to detect if the back button is been hit.

  2. #2
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    You can, and should, implement the Post/Redirect/Get pattern.
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  3. #3
    <?php while(!sleep()){code();} G.Schuster's Avatar
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And possibly form tokens.
    Each time the form is viewed you add a hiddenfield with a unique ID which get's stored with the data.
    If someone resends the same dataset it has the same ID -> show an error message, skip or whatever you like.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •