Hi, I wrote a test script cause I never did this before and I wanted to make sure without doing major revisions to the way the web application ran that it worked. I created a class in a test web application.
<include.php>
<?
Class Test
{
var $testone;
var $testtwo;
}
?>
<index.php>
<?
include("./include.php");
session_start();
$TestClass = new Test;
$TestClass->$testone = "Nothing";
$TestClass->$testtwo = "Something";
session_register("TestClass");
header("Location: index2.php?=SID");
?>
<index2.php>
<?
include("./include.php");
session_start();
echo $TestClass->$testone;
echo "<br>";
echo $TestClass->$testtwo;
session_destroy();
?>
Ok now the problem is with that all said and done, when I run it, when it does the echo I get instead of this example output:
Nothing
Something
I get this:
Something
Something
Just now the question is what am I doing wrong and how do I get it to work? 🙂
I know its not something as simple as I'm putting the same variables in the echo and I've been trying to figure this one out for about an hour or two.