Alex007152 Posted August 25, 2007 Share Posted August 25, 2007 Hi, i'm stuck with my sessions on my new forum. When a new topic has been posted, the script automaticaly creates a new session saying the topic has not yet been read: $_SESSION["Topic $topic"] = "Not Read"; Wich is obviously changed to "Read" as soon as the user gets redirected to his new topic. However, to everyone else this session obviously does not have a value when it's created. I basicaly need to give the session the value "Not Read" when it's created and that it appears so to everyone else. Never done this before, not sure how to. I've tried some database changes but that didnt work it out. Any idea's? Thanks allot in advance. Quote Link to comment https://forums.phpfreaks.com/topic/66621-new-session-with-global-value/ Share on other sites More sharing options...
Alex007152 Posted August 26, 2007 Author Share Posted August 26, 2007 Perhaps theres an alternative method to do this? I basicaly need to get new topics indicating their new. For instance, a red button indicates the button is new, a blue button indicates its read or old. The problem is that my script automaticaly displays blue buttons (indicating the topic is read or old) when the session is not set or set as "Read", as the session will be deleted in time and thus not set (since it would take relatively few people to fill my web storage with sessions if they wouldnt be deleted) so i decided to give the user 7 days to read the topic or it's session will automaticaly be deleted and thus the blue button will be rendered. The problem is that i dont know how to give new topics a value so that they will be rendered red. If you know an alternative menthod please let me know, i urgently need to get this right. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/66621-new-session-with-global-value/#findComment-334505 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.