GRooVeZ Posted April 19, 2012 Share Posted April 19, 2012 hey on my page a list of people get listed by a category u choose if u choose a category and click ok, u are sent to the same page, and i get the category with POST if(isset ($_POST['type'])) { $gameholder = $_POST['game']; $typeholder = $_POST['type']; } this works ... the list of people is 30 members / page when u click on page 2, the post doesnt work anymore, and i get errors, logic ... now i want to get around this with making a session emediatly when the vars get out of POST if(isset ($_POST['type'])) { $gameholder = $_POST['game']; $typeholder = $_POST['type']; $_session['gameholder'] = $gameholder; $_session['typeholder'] = $typeholder; print $_session['gameholder']; } this also works now i want when people click on page 2, the needed vars will come out of the Sessions, and not out of POST so i did this if(!isset ($_POST['type'])) { $gameholder = $_session['gameholder']; $typeholder = $_session['typeholder']; } but this is not working theres nothing in $gameholder also when i move the print session out of the if, it should show when someone clicks page 2 but its not ... any suggestions on this? thx! Quote Link to comment https://forums.phpfreaks.com/topic/261258-sessions-need-help/ Share on other sites More sharing options...
Muddy_Funster Posted April 19, 2012 Share Posted April 19, 2012 case matters - it's $_SESSION not $_session Quote Link to comment https://forums.phpfreaks.com/topic/261258-sessions-need-help/#findComment-1338797 Share on other sites More sharing options...
batwimp Posted April 19, 2012 Share Posted April 19, 2012 and make sure you have session_start(); at the top of each page you are using sessions. Quote Link to comment https://forums.phpfreaks.com/topic/261258-sessions-need-help/#findComment-1338799 Share on other sites More sharing options...
GRooVeZ Posted April 19, 2012 Author Share Posted April 19, 2012 thx guys ! Quote Link to comment https://forums.phpfreaks.com/topic/261258-sessions-need-help/#findComment-1338862 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.