Hi guys,
I'm having a problem with this bit of code that is supposed to update my database with a text field and dropdown selection using ajax.
The first part of the code has the Ajax function
The second part has the Edit fields that include 1) a text field & an associated dropdown 2) a second text field & it's associated dropdown 3) a save button that calls the ajax function
The third part of the code has the Display fields that shows the updated result of the ajax and mysql update.
The last part of the code (on a seperate page) has all the database updates that are called when the ajax function is called.
The issue is that normally the code works perfectly and the database and the Display field is updated using the ajax just fine, BUT if I enter in the same data in both text fields (screename
& screename2), example "a" and "a" which updates the database ok and then remove the data from both text fields which still updates the database ok and then try to RE-ADD the same data again "a" and "a" the database doesn't get updated. It refuses to update UNLESS i use different data for one of the text fields.
Then (assuming I use different data) it will update the database, BUT it won't allow me to then delete the data and do an update.
I tried a bunch of different options to resolve the problem, but it never seems to go away no matter what I do, can you help?
Thanks!
Will
Code attached (comments are not in the real code, just added here):