Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果用户登陆特定页面,如何将条目(在这种情况下为“时间/日期”)插入数据库。也就是说,自动。
这可能吗?
谢谢你的帮助。:)
<?php $date = date("Y-m-d H:i:s"); // mysql insert query here to insert $date. ?>
将此脚本添加到页面顶部。
查看 MySQL日期和时间函数
例子:
<?php $query = mysql_query("INSERT INTO table SET column = NOW()"); ?>