if(isset($_POST['Submit'])) {
$bcolour = mysql_real_escape_string($_POST['bcolour']);
$fcolour = mysql_real_escape_string($_POST['fcolour']);
$sql = "UPDATE user_templates
SET bcolour = '".$bcolour."',
fcolour = '".$fcolour."'
WHERE ID = ".$id."
LIMIT 1" or die(mysql_error());
$result = mysql_query($sql);
print $sql;
}
I'm using that query to update user settings but its not updating, for unknown reason. IF i print the sql it appears fine, and if i run it through phpmyadmin it always says theres no results
UPDATE user_templates SET bcolour = '000000', fcolour = 'FFFFFF' WHERE ID = 1 LIMIT 1
There is a record with ID 1
INSERT INTO `user_templates` VALUES(1, 0, 0);
1 is ID, the first 0 is bcolour and the second is fcolour