I’m new to PHP so it might sound stupid.
I’m trying to update the database, this is my code so far.
$pulldown = CleanUserInput($_GET['q']);
$name = CleanUserInput($_POST['name']);
$result = mysql_query("UPDATE Suppliers SET SuppName = ('$name')
WHERE SuppName = ('$pulldown')");
How do I use $_GET to set the column that it will update?
Assuming that your variables are being passed correctly to this script, the 3rd line of your script should look like this:
To set the column name that is to be update via a $_GET variable, your code could look like this:
Of course this will the replace the value in the column for the variable
$column_name. Not sure if that is what you are trying to do.