session_start();
if (($_SERVER['REQUEST_METHOD'] == 'GET') || (! isset($_POST['stage']))) {
$stage = 1;
} else {
$stage = (int) $_POST['stage'];
}
if ($stage > 1) {
foreach ($_POST as $key => $value) {
$_SESSION[$key] = $value;
}
}
if ($stage == 1) { ?>
Hello .
You are years old.
Your favorite color is
and your favorite food is .