On one PHP server I have two files. One file (the name is "first.php") contains this code:
<html>
<head>
<title>First Page</title>
</head>
<body>
Please enter your password and age:
<form action="pass.php" method="post">
Name: <input type="text" name="fname" />
Age: <input type="text" name="age" />
<input type="submit" />
</form>
</body>
</html>
The other file ("pass.php") contains this code:
<html>
<head>
<title>Secon Page</title>
</head>
<body>
<?php
if ($fname=="Jack")
echo "You are Jack!";
else
echo "You are not Jack!";
?>
</body>
</html>
As far as I understand, if a user enters "Jack" in the first page, than the second page should be displayed with "You are Jack!" line, but it doesn't happen. Why is it so?