Hey guys. I’m trying to update my database with new information from a form on another page.
mysql_query(“UPDATE software SET pcname=’$new_value’ WHERE pcname=’$edit_machine’”);
^This works great and I have no trouble with it. But what I want to do is use to a variable to decide what table gets updated like below
mysql_query(“UPDATE software SET ‘$software_item’=’$new_value’ WHERE ‘$software_item’=’$edit_machine’”);
But ^this doesn’t work for me. The script runs without fatal errors but nothing actually happens. Is it possible to do this with variables for the field?
Thanks in advance.