I need a simple php code for the below query
Create browsing history page of website. When user browse through pages of website at the end user can see which pages he browsed.
Replies
-
Kaustubh Katdare
Not getting a clear idea of this. You want a PHP page that keeps track of which pages a user has visited - is that right? So I'm guessing -sravan18Create browsing history page of website. When user browse through pages of website at the end user can see which pages he browsed.
1. User visits page 3-5-9 on example.com
2. A page on example.com/history.php keeps track of which pages were browsed by the user
Or do you want something similar to what Google Analytics does - embeds javascript at the bottom of every page and keeps track of who's visiting what? -
sravan18Yes, I need a PHP page that keeps track of which pages a user has visited. Could you help me out with this.
-
Manish Goyalits simple
create a table named history with 3 cols, id, page, datetime, session id in mysql or whatever db you want to use
now create a function in header of your php file (this file must be included on all web pages)
Now when ever user visits any page , simply put an entry to this table,
If you want then you can add one more col named count, that will increment if user tries to view same page again
Let me know if any doubts
You are reading an archived discussion.
Related Posts
hello friends,
I am constructing my house in a place in which the ground has lot of rocks, stones.....
My engineer is unwilling to go for some good depth in...
Since Bangalore is facing big Garbage Crisis something has to be thought and bring out a breakthrough as early as possible.Garbage landfills in Karnataka cannot take anymore, so can garbage...
Guys listen If you are tracking End Times report you will know one of the prime prophecy By the Mayans about the End of the world
They have said
The...
hello everyone, just want to introduce you fellows to the latest member of the CE. my real name is john my friends call me winterjorni, i am young lad who...
Can anyone help me out in this..
i've been trying it since a long time but not getting the correct approach! 👀