Keep getting the "Error Editing" message, which is really really annoying me as I can't see what's wrong. This page is posted an array from a previous page, which is 'print_r'ing correctly. It breaks before the update. Have I missed something really obvious?
PHP:
if (isset($_POST[id])){
print_r ($_POST);
print_r ($_GET);
//update
$queryupd = "UPDATE products SET name = '$_POST[name]', price = '$_POST[price]', stock = '$_POST[stock]', desc = '$_POST[desc]', category = '$_POST[category]' WHERE id = '$_POST[id]'";
$resultupd = mysql_query($queryupd);
//update the entry
if($resultupd){
$message = "Product Edited!";
header("Location: editProduct.php?message=$message");
}else{
$message = "Error Editing!";
echo $message;
};
}else{
echo 'id not set';
};