an example on setting a session variable
<?php
// initialize the session
session_start();
// method 1
$myvalue = "Hello, this is a session variable.";
session_register("myvalue");
// method 2
$_SESSION["myvalue"] = "Hello, this is a session variable.";
// same as method 2, but for PHP lower than 4.1.0
$HTTP_SESSION_VARS["myvalue"] = "Hello, this is a session variable.";
// now to reference to this variable, use $SESSION or $HTTP_SESSION_VARS
print $SESSION["myvalue"];
?>
?>