We were able to run it in our comp lab a while ago, but I don't know if I'm doing it wrong or something's missing on my desktop.
<!DOCTYPE html>
<html>
<body>
<form method="post" action="sample2.php">
Name: <input type="text" name="fname">
<input type="submit">
</form>
</body>
</html>
And then we used this to print the input on a different page -
<!DOCTYPE html>
<html>
<body>
<?php
$name = $_POST['fname'];
echo $name;
?>
</body>
</html>