I don't understand, I'm trying to edit a field in the db. From the form to the db update page I'm echoing out what I want to edit in the db so I'm guessing it's the WHERE clause that's making it not update. Anyway here's the code: <?php $id=$_POST['id']; $image=$_POST['image']; mysql_query("UPDATE 'slider' SET image = '$image' WHERE 'id' = '$id' "); echo "<font color=green>Success:</font> The slider image was updated in the database!<br><br><font color=red><b>YOU WILL BE REDIRECTED SHORTLY...</font></b><meta http-equiv='REFRESH' content='3;url=slider.php'>"; ?> <br> <?php echo"$id";?><br> <?php echo"$image";?> PHP: As I say, it's echoing out fine. Anyone know how to fix this?
I assume you are connected to the DB beforehand. The syntax is incorrect, should be: mysql_query("UPDATE `slider` SET `image` = '$image' WHERE `id` = '$id' "); PHP: