Jump to content

update not updating


HDFilmMaker2112

Recommended Posts

The following mysql update isn't updating the database.

$tbl_name="products"; // Table name 1
$tbl_name2="keywords"; // Table name 2

$product_id=$_POST['product_id'];
$product_name=$_POST['product_name'];
$product_price=$_POST['product_price'];
$product_category=$_POST['product_category'];
$product_link=$_POST['product_link'];
$product_image=$_POST['product_image'];
$product_tag=$_POST['product_tag'];
$keywords=$_POST['keyword'];
$keywords=explode(",",$keywords);
$product_features=$_POST['product_features'];
$product_pros=$_POST['product_pros'];
$product_cons=$_POST['product_cons'];
$product_description=$_POST['product_description'];
$product_notes=$_POST['product_notes'];

$sql20="UPDATE $tbl_name product_name=$product_name, product_price=$product_price, product_category=$product_category, product_link=$product_link, product_image=$product_image, product_tag=$product_tag, product_features=$product_features, product_pros=$product_pros, product_cons=$product_cons, product_description=$product_description, product_notes=$product_notes WHERE product_id = $product_id";
mysql_query($sql20);

Link to comment
https://forums.phpfreaks.com/topic/236393-update-not-updating/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.