#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    1
    Rep Power
    0

    stop duplicate entry to db on refresh the page


    Stop to re enter data into db after refresh the browser
    i used header (redirect to page ) but wen user press back button from browser and submit button is clicked data is entered again to db
  2. #2
  3. Confused badger
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Mar 2009
    Location
    West Yorkshire
    Posts
    1,184
    Rep Power
    492
    Then do a check to see if the data already exists before the INSERT

    Comments on this post

    • ManiacDan agrees
    "For if leisure and security were enjoyed by all alike, the great mass of human beings who are normally stupefied by poverty would become literate and would learn to think for themselves; and when once they had done this, they would sooner or later realise that the privileged minority had no function and they would sweep it away"
    - George Orwell, 1984
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2010
    Posts
    67
    Rep Power
    5
    Isn't using primary key is a solution for this? Though I am not expert of programming but using primary key can avoid duplication in the same field.
    Visit ESDS website for Rich Data Center Web Hosting and Software Services at Affordable Costs.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2011
    Posts
    306
    Rep Power
    6
    Well this one would be kind of hard to answer without knowing the db table structure and what is being entered. However, you do need to have the form check to see if the db already contains the update from the user.

    Again,

    if you provided your code and db structure we would be able to help come up with a good solution for you.

IMN logo majestic logo threadwatch logo seochat tools logo