Remove white space from this line.
$sql = " UPDATE coupons SET coupon_used= '0' WHERE coupon_code = '$submit' ";
Should be
$sql = "UPDATE `coupons` SET `coupon_used` = '0' WHERE `coupon_code` = '$submit'";
And print the above the query line, copy and past it into phpMyadmin and run it manually, and check how it works.