Seniors learn how to do with PHP recent visitors how to do ah hair some code clear AH I am more stupid
Source: Internet
Author: User
Seniors learn how to do with PHP recent visitors how to do ah? Make some code clear, I'm rather stupid.
Seniors learn how to do with PHP recent visitors how to do ah? Make some code clear, I'm rather stupid.
------Solution--------------------
Save the visitor with the data table, the query will know pull!
------Solution--------------------
Save Visitors ' information at login
The time of the display is displayed in a chronological order.
------Solution--------------------
Save visitors ' information when visiting the show
The time of the display is displayed in a chronological order.
------Solution--------------------
This is best saved in a table in the database,
------Solution--------------------
To have a table dedicated to keeping visitors ' information
------Solution--------------------
The first thing to do is create a visitor table
CREATE TABLE Visitorinfo (
ID Bignit (TEN) primary key auto_increment,
Time varchar (ten) NOT NULL,//access times
f_id Int (ten) not NULL,//ID accessed
u_id Int (ten) not NULL//The ID of the visitor can be obtained from the session.
) Enging=myisam; CHARSET=GBK;
When you log in, put the login information into the session, need to get all the visitor information, with a SQL can be, two tables user visitorinfo. For reference.
------Solution--------------------
1. Create a table. Field: Id,name,
2. When the user logs in, the user name is written to the library.
3. When another user logs in, the name in the table is removed Limite 0,10 for display.
------Solution--------------------
You can use XML or txt text, but I won't write it.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.