I am trying to use a statement to update a varchar(30) field in a MySQL db. This statement is based on another statement that works. The only difference is that the working statement is using select boxes, and my statement is using a text box for the update.
Any help in figuring why my statement does not work is appreciated:
working statement:
Non-working statement:
Any help in figuring why my statement does not work is appreciated:
working statement:
Code:
// Shipping Date
if (isset($HTTP_POST_VARS["year"])) {
$updateSQL = sprintf("UPDATE juvent_orders SET shipped='%s' WHERE orderno='%s'",$HTTP_POST_VARS["year"].'-'.$HTTP_POST_VARS["month"].'-'.$HTTP_POST_VARS["day"],$HTTP_GET_VARS["orderno"]);
$Result1 = mysql_query($updateSQL, $con) or die(mysql_error());
}
Non-working statement:
Code:
// Serial
if (isset($HTTP_POST_VARS["serial"])) {
$updateSQL = sprintf("UPDATE juvent_orders SET serial='%s' WHERE orderno='%s'",$HTTP_POST_VARS["serial"],$HTTP_GET_VARS["orderno"]);
$Result1 = mysql_query($updateSQL, $con) or die(mysql_error());
}