Inserting CURDATE() and CURTIME() in MySQL (PHP)-Collection of common programming errors
You have a syntax error – a comma on the end of the query:
'".$name."', '".$email."',)";
^ here
Remove it, so the full query becomes:
$query = "INSERT INTO `ordisp` (date, time, operator, status, completed, name, email) VALUES (CURDATE(), CURTIME(), '".$operator."', '".$status."', '".$complete."', '".$name."', '".$email."')";
For future debugging you should look at the MySQL error, it will give you a description of the problem, for example unknown field/table name or a syntax error etc etc.
Originally posted 2013-11-09 23:08:27.