Ok.
I suggest you to use the cookie, because the filename may be a problem with an high number of visits...
To store a var into a cookie just use the command setcookie()
This operation save a little text file on the hd of the client. In the next page you can get the value stored with $_COOKIE[] array, or just with the name of var stored iif you have global on.
Just an example:
first page:
$res=1; $username='bad';
setcookie("cookRes","$res");
setcookie("cookUser","$username");
second one:
echo $cookRes; echo $cookUser;
//or
// echo $_COOKIE["cookRes"];
// echo $_COOKIE["cookUser"];
// if you don't have global on...
I hope this helps...