Jump to content

sessions, need help


GRooVeZ

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/261258-sessions-need-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.