itsureboy Posted August 26, 2007 Share Posted August 26, 2007 Is there anyway i can do this? Basically i have a rating system and I dont want users to be able to vote more than once on any given row by ID so i store sessions. However since i cant do what i want they can only vote once on 1 ID and no other. What i want to do is explained below.... $_SESSION['\\change according to the value of $id'] = $id; can i put $id in between the session brackets? or any other way to do what i want? hope this makes sense...thanks..... Quote Link to comment https://forums.phpfreaks.com/topic/66714-session-help/ Share on other sites More sharing options...
matthewhaworth Posted August 26, 2007 Share Posted August 26, 2007 $id = 12; $_SESSION[$id] = true; echo $_SESSION[$id]; Outputs: true Simple answer? Yes, you can Quote Link to comment https://forums.phpfreaks.com/topic/66714-session-help/#findComment-334282 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.