Okay so I'm doing my website again and I want to edit or update the values of the rows so I went to phpmyadmin and check what is the code for updating values so I have this:
UPDATE `database`.`table` SET `title` = 'My Title', `message` = 'My Message' WHERE `table`.`id` =2 LIMIT 1 ;
So I tried rephrasing it like this on PHP:
mysql_query("UPDATE posts SET title = '$title', message = '$message' WHERE id='$id' LIMIT 1");
But when I tried checking my table, it doesn't change.
By the way, there are no errors showing.
$titleand$contents? Also you need to usemysql_real_escape_string()mysql_*functions in new code. They were removed from PHP 7.0.0 in 2015. Instead, use prepared statements via PDO or MySQLi. See Why shouldn't I use mysql_* functions in PHP? for more information.