Session won't pass varibles

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Session won't pass varibles

Postby timstring » 25. September 2012 06:13

I have this code at the very beginning of an html page masquerading as a php:

Code: Select all
$System = $_SESSION['System'];
echo $System;

which is ignored.

I have this embedded in the html code:

Code: Select all
$System = $_SESSION['System'];
echo $_SESSION['System'];
echo $_SESSION['FirstName'];
echo $_SESSION['LastName'];

This returns nothing

No matter what I've tried, I can't get this code to work. It seems like the code is completely overlooked. I know that the passing variable is working, because I have tested it. Also, the session is carried over to the next page and works there.

More info: I have this code in the sending php file:

Code: Select all
   echo file_get_contents("lookupsplash.php");

when reading "lookupsplash.php", file_get_contents starts reading at the body tag of lookupsplash.php.

I have also tried
Code: Select all
echo readfile("lookupsplash.php");
with the same result

What gives?
"If builders built buildings the way that programmers write programs, the first woodpecker to come along would destroy civilization."
User avatar
Posts: 22
Joined: 17. September 2010 02:16

Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 4 guests