The NOW() function returns the current date and time as `'YYYY-MM-DD HH:MM:SS', which can be directly stored in the DATETIME field.
CURDATE() returns today's date in the format of 'YYYY-MM-DD', which can be directly stored in the DATE field.
CURTIME() returns the current time in the format of 'HH:MM:SS', which can be directly stored in the TIME field.
Example: insert into tablename (fieldname) values (now())
The above introduces the php mysql space to insert the current time in php MYSQL, including the content of php mysql space. I hope it will be helpful to friends who are interested in PHP tutorials.