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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.