$id = 1; //temp
$promoTitle = trim($_POST['promoTitle']);
$imageURL = trim($_POST['imageURL']);
$affLink = trim($_POST['affLink']);
$couponCode = trim($_POST['couponCode']);
$stmt = $db->prepare('UPDATE dashboard SET promoTitle=?, image=?, url=?, couponCode=? WHERE id=?');
$q = $stmt->bind_param('ssssi', $promoTitle, $imageURL, $affLink, $couponCode, $id);
if($result = $db->query($q)){
echo "updated";
}else{
echo mysql_errno();
}
stuck for half an hour and still couldn't find out what's wrong. I has return no error. My table look like this https://i.stack.imgur.com/7I1xh.png