Hi guys,
I'm trying to insert the current date from a php form into a database.
My query is:
$sql3="INSERT INTO orderDetails (compName, package, cost, date) VALUES ('$companyName', '$package', '$cost_record', 'date()')";
This produces the following: 0000-00-00 00:00:00 which obviously isn't right.
Can anyone recommend how to get this to display the correct date/time?
Also, I need it in the following format: yyyymmddhhmmss - Is this possible? How would I go about it?
Thanks!