Why can't the time in the database be output in PHP? How can I output the time correctly?
无花果树
无花果树 2019-07-31 16:00:23
0
2
1421

11.PNG

$sql4="select denglu_time from user where user_name = '$_POST[username]' and password = '$_POST[u_password]'";
$result4 = mysql_query( $sql4);
$row1 = mysql_num_rows($result4);

echo "Time$row1[denglu_time]";

Why can’t the time in the database be output? How can I output the time correctly?

无花果树
无花果树

reply all(2)
angryTom

You can try to store the timestamp in the database, and then convert the timestamp into time in PHP when needed

樂成

$row1['denglu_time']
The subscript needs to be quoted for a string. If there are no quotes, if there is a constant equal to the index value at this time, the index will be converted to a constant value

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!