0

i have a forum, with new posts how do i use sessions for each user to determine if the posts clicked on and not? I'm guessing sessions because that is individual to the user...

e.g.

new post, then click on not new post.


i can't assign this to the actual post or then it would display as not new post for other users that haven't seen it.

i can't use time either, because i want it if it's been clicked on by a user or not.

any tips?

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by cwarn23
0

i would would suggest i dont know if this is the right way but i would make a table that has a index / username / post_id
so every time the user would click on the new post it would write to the table that he saw it you can also add the date too if you want to show him when he looked at it so then when u load the main page you just query the data into a array from the user and check it against that

0

i would would suggest i dont know if this is the right way but i would make a table that has a index / username / post_id
so every time the user would click on the new post it would write to the table that he saw it you can also add the date too if you want to show him when he looked at it so then when u load the main page you just query the data into a array from the user and check it against that

I agree. Having a giant table with columns for postid, user, clicked will be able to do the job as then you can use join mysql query's when selecting and get it all to display right the first time round with better efficiency.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.