I need a little help with this, I am trying to insert some data into a MYSQL table which includes the now values for date & time for orders.
Code:
$query= "INSERT INTO ordertable
VALUES ('".$listauthor."','".$ordernumber.",'"NOW()"','"NOW()"')";
Error:
Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\createbasket.php on line 15
How can I fix this?
You don’t want to encapsulate
NOW()with quotes. You’d need to do: