Hi, Need a perfect user data base solution for my ecommerce website. I want to track whole activity of my end user until the user logout Thanks in Advance
you want to see the history of pages visited by the user that logged in? maby create a table that can hold visited pages and add a little script to each requested page to insert data into the database? b.t.w. what do you have tried?
A simple way would be to add this snippet to the top of each page first make this database in your SQL CREATE TABLE TRACKUSER ( IPUser VARCHAR( 50 ), Time VARCHAR( 50 ), Date VARCHAR( 50 ), Page VARCHAR( 50 ) ; Then add this to the top of your page <?php // Name Page $pagename="Home Page"; // Then Save to Database // SQL CONNECTION $query="INSERT INTO TRACKUSER VALUES ("$ip", "$time", "$date", "$pagename"); $result = mysql_query($query) or die ("Query cannot be added at this time."); ?> However this can slow page load speeds down. Regards