$query = "INSERT INTO class (name,time) VALUES ('$name', NOW())";
Such a sentence. But after the submission in the phpMyAdmin database only the date, there is no time, the output is also such a sub-
tian2016-11-24tian2016-11-23tian2016-11-24tian2016-11-24tian2016-11-24
But directly inside the select Now () is to get the current date and the exact time, why not submit the time AH?
Reply content:
$query = "INSERT INTO class (name,time) VALUES ('$name', NOW())";
Such a sentence. But after the submission in the phpMyAdmin database only the date, there is no time, the output is also such a sub-
tian2016-11-24tian2016-11-23tian2016-11-24tian2016-11-24tian2016-11-24
But directly inside the select Now () is to get the current date and the exact time, why not submit the time AH?
Please check if the Time field in your table is set to DateTime, if set to date or set to char (10), it will be truncated due to formatting or incorrect length.