MadJuggla9
2[H]4U
- Joined
- Oct 9, 2002
- Messages
- 3,515
I have a mysql DB im writing a small update script for. Basically, the page takes in the primary key thru the URL string and queries the DB, then fills each of the form elements (input boxes) in with the info. Changes can be made, then click submit can be clicked and the stuff is then updated in the DB.
Im having problems getting dropdown boxes to work with this. I can add just fine the first time, but the update seems to have problems. It's kind of like this:
Where do you live:
Tennessee
California
Michigan
etc...
When i perform my update query, where i say:
UPDATE myTable SET state=$form_state
I get this: "Unknown column 'Michigan' in 'field list'"
It's like its reading it backwards and trying to put the DB table's column into the variable, then saying that the variable is not a field in my DB's table.
Im having problems getting dropdown boxes to work with this. I can add just fine the first time, but the update seems to have problems. It's kind of like this:
Where do you live:
Tennessee
California
Michigan
etc...
When i perform my update query, where i say:
UPDATE myTable SET state=$form_state
I get this: "Unknown column 'Michigan' in 'field list'"
It's like its reading it backwards and trying to put the DB table's column into the variable, then saying that the variable is not a field in my DB's table.