If your application deals with browsers that do not support cookies, you will have to use other methods to pass information from one page to another in your application. One method is to pass the data through forms (forms and user input are described earlier in this tutorial).
The form below passes the user input to "welcome.php" when the user clicks on the "Submit" button:
< html >
< body >
< form action="welcome.php" method="post" >
Name: < input type="text" name="name" / >
Age: < input type="text" name="age" / >
< input type="submit" / >
< /form >
< /body >
< /html >
Retrieve the values in the "welcome.php" file like this:
< html >
< body >
Welcome < ?php echo $_POST["name"]; ? >.< br / >
You are < ?php echo $_POST["age"]; ? > years old.
< /body >
< /html >
A PHP session variable is used to store information about, or change settings for a user session. Session variables hold information about one single user, and are available to all pages in one application.