Is there something wrong with this line??
mysql_query("INSERT INTO table ('$field') VALUES ('$change') WHERE password='$password' AND username='$username'");
mysql_error says:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''address') VALUES ('New Address St.') WHERE password='theuserpw' AND usernam
It looks like it's inserting a double quote before the address field. The field name is a variable. Is this not allowed or something?
What I'm trying to do is let the user pick what field they want to change and then save that change in the database.
<added>Figured it out:
UPDATE table SET $field = '$change' WHERE password='$password' AND emailconfirm='$username'</added>