I have this little test application I made (see code below). I have looked
for a cookie that keeps track of the session but I cannot find one does PHP
use a cookie to keep track of the session?
Thanks for any help you can give!!!
First file
test.php
//*********** Start Here
<?php
session_start();
header("Cache-control: private"); // IE 6 Fix.
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<FORM METHOD="POST" ACTION="test2.php">
Enter your Name: <input type="text" name="name">
<input type="SUBMIT" value="Submit">
</FORM>
</body>
</html>
Second file
test2.php
//*********** Start Here
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
// start the session
session_start();
//header("Cache-control: private"); //IE 6 Fix
// Get the user's input from the form
$name = $_POST['name'];
// Register session key with the value
$_SESSION['name'] = $name;
// Display the sssion information:
?>
Welcome to my website <strong><? echo $_SESSION['name']; ?></strong>!<br />
Let's see what happens on the <a href="test3.php">next page.</a><br /><br />
</body>
</html>
Third file
test3.php
//*********** Start Here
<?php
// start the session
session_start();
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Welcome to my website <strong><?php echo $_SESSION['name']; ?></strong>
</body>
</html>