|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Having problem with duplicate entry
I have set up a form to post to db.
I go edit the entry by using browser <- back and it duplicated the entry. I do have an "if submit" line..maybe it's not working correctly. Any ideas? I'd like to have users use only built in buttons for direction, but some pages are not part of the admin. function, the viewed pages. Thanks for all the help.
__________________
bow wow! |
|
#2
|
||||
|
||||
|
Post code.
|
|
#3
|
|||
|
|||
|
When you click back the posted value of submit is still there... this is why you keep submitting the data.
The primary problem you have is due to poor database design. You need to have a primary key set or even a non-primary, but unique index. If you have this then your data will not be duplicated. You would get an error on this page, but you will not have duplicate data. You can fix the error simply...All you need to do is create a function that checks if that key exists in the database and if it does exist craft a friendly error messages and kindly direct the user on how to re-input their data and resubmit.
__________________
__________________________________________________ _ Wil Moore III, MCP | Integrations Specialist | Senior Consultant Are You Listed...? | DigitallySmooth Inc. |
|
#4
|
|||
|
|||
|
yes, this sounds correct...
I'll try changing the db, and post my script for help. Thanks for the help.
lbd |
|
#5
|
|||
|
|||
|
No problem... glad to help.
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Having problem with duplicate entry |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|