Jump to content

Problem with session IDs.


kenneal

Recommended Posts

I have some problems with my sessions. Apparently only some of the sessions are passing over. I am not sure why.

 

question.php

 

$i=0;

while ($i < $num) {

$f0=mysql_result($result,$i,"qid");

$_SESSION['qid' . $i]=$f0;

$i++;

}

//Set starting score and last question.

$_SESSION['score']=0;

$_SESSION['last']=10;

 

 

question2.php

 

$i=0;

while ($i < $num) {

echo $_SESSION['qid' . $i];

$i++;

}

//Echo

echo $_SESSION['score'];

echo $_SESSION['last'];

 

 

I have tested question.php and it sets all the sessions there alright. Tried echoing it and it works.

However in question2.php, only the score and last session values posts. Does anyone have any idea? These files are all in the same main domain and folder too.

 

Rgds,

Kenneth

 

Link to comment
https://forums.phpfreaks.com/topic/137982-problem-with-session-ids/
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.