I need another set of eyes, my code is below. I keep getting this error: Error: Unknown column 'another' in 'field list'.
Anybody know what that means?
if (isset($_POST['submit'])) {
$item_id = $_GET['id'];
$user_id = check_input($_POST['user_id']);
$list_name = check_input($_POST['list_name']);
$date = check_input($_POST['date']);
$store = check_input($_POST['store']);
$item = check_input($_POST['item']);
$itemprice = check_input($_POST['itemprice']);
$itemnumber = check_input($_POST['itemnumber']);
$itemtotalprice = $itemprice * $itemnumber;
$couponvalue = check_input($_POST['couponvalue']);
$couponsused = check_input($_POST['couponsused']);
$doubledcoupon = check_input($_POST['doubledcoupon']);
$totalcouponvalue = check_input($_POST['totalcouponvalue']);
$discounts = check_input($_POST['discounts']);
$numberdiscounts = check_input($_POST['numberdiscounts']);
$storecredit = check_input($_POST['storecredit']);
$totaldiscounts = ($discounts * $numberdiscounts) + $storecredit;
if ( $doubledcoupon == 1) {
$totalcouponvalue = ($couponvalue * $couponsused) * 2;
} else {
$totalcouponvalue = $couponvalue * $couponsused;
}
$query = "UPDATE item SET user_id = $user_id, list_name = $list_name, date = $date, store = $store, item = $item, itemprice = $itemprice, itemnumber = $itemnumber, itemtotalprice = $itemtotalprice, couponvalue = $couponvalue, couponsused = $couponsused, doubledcoupon = $doubledcoupon, totalcouponvalue = $totalcouponvalue, discounts = $discounts, numberdiscounts = $numberdiscounts, storecredit = $storecredit, totaldiscounts = $totaldiscounts
WHERE item_id = $item_id";
if (!mysql_query($query,$link)){
die('Error: ' . mysql_error());
} else {
$added = "Your items have been added.";
}
}