PHP Update issue...dull but annoying

barneymills

Hi .. I can't get this UPDATE working, i can successfully INSERT INTO and SELECT*FROM the mysql table, but this UPDATE script does not update. I have copy/pasted any section i can from working queries. I have followed and implemented all forum solutions with no joy, I run the script in the browser and get no errors ... This is my first attempt at PHP web services so my knowledge is limited and so hopefully the problem will be painfully obvious to the trained eye.

If anyone can see anything or suggest something to establish the problem it would be greatly appreciated

rtrethewey

I'd suggest you start with the essentials: Add echo($query) to the script so you can see exactly what's being sent to the mysql_query() function. Then use a tool like phpMyAdmin to examine the data before and after your tests. At a guess, I'd bet that there's a problem with the $formTitle variable that prevents the query from finding a matching record in the database to update. The code runs without an error because there are no syntax errors in the script or the query, but nothing happens.

barneymills

Thank you for your suggestions, i went back to using the formID rather than the formTitle .... for anyone else in the same predicament ...this is what ended up working in the end... so might be worth trying.