refresh problem...

Results 1 to 2 of 2

Thread: refresh problem...

  1. #1
    rinku Guest

    Default refresh problem...

    I have a page which is adding data to the database.But the problem is that when ever i click refresh the same data gets added again to the database.I am not vey good at designing databases.Can anyone out there please help.<BR>Thanks in advance

  2. #2
    Join Date
    Dec 1969
    Posts
    10

    Default RE: refresh problem...

    that a prob most web pages have.. there are 2 ways to help prevent that, neither are all that fun.... way one is to do a check before you enter the data, depending on your data this can be easy or hard... but if say you are entering a client who has a phone number then you can be pretty sure that if you first did a select with that phone number and got a row back then you would NOT want to enter that cleint again..... however sometimes you dont have anything like phone number that is unique and therefor you have to do it a secound way... the way i have done that in the past is to set up 3 pages, 1 that holds the info and when they hit the ADD button then it redirects to a 2nd page that actually does the insert and then automaticly redirects them to the 3rd page (no if refresh is hit on the 3rd page nothing happens) you can even take that a step further and have the 3rd page redirect to a 4th page, that way the user cant even hit that back button and have it douplicat the data.<BR><BR>hope that helps more then confuses.<BR>l8tr<BR>~Deion

Posting Permissions

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