there'r registered users they have profile. how i can get the registers users who visited the other registered user profile. for example, if there'r a,b,c, members, and b and c visits the the profile of member a.. how i can show that ?
tracking the visitors which visited a profile.
Started by sami, Oct 02 2006 02:52 AM
2 replies to this topic
#1
Posted 02 October 2006 - 02:52 AM
#2
Posted 02 October 2006 - 05:48 AM
Collect the UserID from the logged in cookie, then each time someone accesses someones profile check to see if their ID is already in the Visited list (ie "b,c") if it's not add a ",d" at the end of it.
To check you just explode() the string into an array. Then to add you implode() it back into a string before updating the field in mySQL.
That's how I would do it.
To check you just explode() the string into an array. Then to add you implode() it back into a string before updating the field in mySQL.
That's how I would do it.
#3
Posted 02 October 2006 - 12:14 PM
no need to break down the array, you can check using the in_array() function, and add another key at the end using array_push() function.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
