Update db with $_POST

From: Date: Tue, 15 Mar 2005 22:33:24 +0000
Subject: Update db with $_POST
Groups: php.general 
Request: Send a blank email to php-general+get-210855@lists.php.net to get a copy of this message
I'm trying to update some form data with this db update query and it's not working, I'm not getting an error either. $db->query("UPDATE items SET item_name = $_POST[title], item_desc = $_POST[description], item_price = $_POST[price], extraprice = $_POST[extraprice] WHERE item_id = 3"); & I've tried this: $db->query("UPDATE items SET (item_name, item_desc, item_price, extraprice) VALUES (?,?,?,?) WHERE item_id = 3", array($_POST['title'], $_POST['description'], $_POST['price'], $_POST['extraprice'])); Thanks, Dan.

« previous php.general (#210855) next »