<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
  <title>Example</title>
</head>
<body>
<?php
if (empty($_POST['yourname'])) {
  echo '<p>You must give me your name!</p>';
} else {
  $_SESSION['name'] = $_POST['yourname'];
  echo "<p>Thank you for telling me your name, {$_SESSION['name']}.";
  echo " I've now stored it in your session!</p>";
  echo '<p><a href="example3-3.php">Go to another page</a></p>';
}
?>
</body>
</html>
