I am trying to update a column for a certain user with PHP/MySQL. What is the proper way for me to set that equal to a variable?
$style is equal to a value that is from a form (post).
When setting 'style' equal to a string value that is also in single quotes, I do not get an error. I only get an error when setting 'style' equal to a variable.
$query = "UPDATE `users`
SET `style` = $style
WHERE `id` = $userid;";
Thank you very much.