This question already has an answer here:
I am scratching my head to make this lines of code to work, but no success...Would be nice if someone can point out what is the best practice to write such queries?
if(isset($_POST) && $_POST["id"] > 0)
{
include('../../config.php');
$id = $_POST["id"];
$title = mysql_real_escape_string($_POST["title"]);
$desc = mysql_real_escape_string($_POST["desc"]);
$cat = $_POST["catid"];
$_DB->Execute("UPDATE gallery_imgs SET title = `$title`, description = `$desc` WHERE id = $id");
header("location: admin.php?mode=images&id=$cat");
}
else
{
//Other stuff!
}
This is the error I get:
Error number: 1054
Error : Unknown column 'The SIEK!' in 'field list'
</div>