How can I add a message on the message board? how can I add a message display time? complete code with comments & nbsp; thank you ------ solution ---------------- add a message time field, can't you? ------ Solution ------------------ The same is true for my message board. add a message time field in the database table and the message board's message time field.
How to add and display the message time
Complete Code
With comments
Thank you.
------ Solution --------------------
Can I add a message time field?
------ Solution --------------------
My message board is also. add a message time field in the database table. when you leave a message, you can insert the current time directly. then, you can query it when it is displayed.
------ Solution --------------------
When adding a time field to the database, you should check which type is used. one is the timestamp, the field is set to int (10), and the other is datetime, if you set it to int, pay attention to the time zone... Let's take a look at the php manual and mysql manual.
------ Solution --------------------
In the database, it is best to add a time for adding a message to the table of messages. whenever a user adds a message, the database automatically adds the current time of the message to the table, you only need to query the displayed information. Haha ~