I have tried to insert the current date using the now()
syntax but it's not working. The column in MySQL is under datetime
called date_added
but when I check the command prompt all I get is 0000-00-00 00:00:00
.
INSERT INTO FOOD (food_name, food_type, total, available, date_added)
VALUES
('$_POST[food_name]','$_POST[food_type]','$_POST[total]','$_POST[available]','NOW()')";