How to show if a user has read a topic in my forum?

Discussion in 'PHP' started by CuBz, Aug 26, 2011.

  1. #1
    I have created a forum for my website but the only thing I don't have a clue about, is how to show if each user has read each topic or not.

    I want each user to know if they have read each topic or not, and for it to be unread for everyone everytime a reply is posted in a topic.

    How can i do this using php?

    Thanks
     
    CuBz, Aug 26, 2011 IP
  2. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #2
    Keep a record in the database - user number and article number every time someone goes to an article.
     
    Rukbat, Aug 26, 2011 IP
  3. CuBz

    CuBz Peon

    Messages:
    117
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Sorry, I don't fully understand what you mean
     
    CuBz, Aug 26, 2011 IP
  4. iBank ™

    iBank ™ Peon

    Messages:
    63
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    0
    #4
    Go to Buy, Sell and Trade section then. Seriously, if the given sentence made no sense to you, even if we'll give you a piece of code, you won't know where to put it.
     
    iBank ™, Aug 26, 2011 IP
  5. CuBz

    CuBz Peon

    Messages:
    117
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I'm not stupid, I did understand what he meant, I just don't want endless inserts on my database everytime someone reads a topic for every topic, I really thought there was a simpler way
     
    CuBz, Aug 26, 2011 IP
  6. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #6
    In order to still have user data after the user is gone, you have to save the data somewhere. A database is the most efficient way to do it.
     
    Rukbat, Aug 26, 2011 IP