I'm trying to update a couple of fields in my table, and I can't figure out why it's giving me a syntax error, but not saying which line. Here's the code.
<?php
require("_statusSessionHeader.php");
require("dbheader.php");
if(isset($POST['update']))
{
$status = strip_tags($POST['status']);
$comments = strip_tags($_POST['comments']);
mysql_query("UPDATE orderStatus SET status = '$status', comments = '$comments' WHERE orderid = $_GET[orderid]");
header("location: statusSet.php");
exit;
}
$order = mysql_fetch_array(mysql_query("SELECT * FROM orderStatus WHERE orderid = $_GET[orderid]"));
echo(mysql_error());
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Update PC Repair Status</title>
</head>
<body>
<h2>Update PC Repair Status</h2>
<form method="post" action="<?=$_SERVER['PHP_SELF'];?>">
<p>Status:</p>
<p>
<input type="radio" name="status" value="checkinshelf" /> Check-in shelf
<input type="radio" name="status" value="onthebench" /> On the bench
<input type="radio" name="status" value="ongoingdiag" /> Ongoing diagnostic
<input type="radio" name="status" value="onholdpartsonorder" /> On hold - parts on order
<input type="radio" name="status" value="waitingoncustomerresponse" /> Waiting on customer response
<input type="radio" name="status" value="finished" /> Finished
</p>
<p>Comments:</p>
<p><textarea name="comments" rows="5" cols="45" ></textarea></p>
<p><input type="submit" name="update" value="Update Status" /></p>
</form>
</body>
</html>