<form action="<?php echo htmlspecialchars($PHP_SELF, ENT_QUOTES)?>" method="POST">
Your name: <input type=text name=name><br>
You age: <input type=text name=age><br>
<input type=submit>
</form>
<?php
if($_SERVER['REQUEST_METHOD']=='POST') {
$Oname = htmlspecialchars($_POST['name'], ENT_QUOTES);
$Oage = (int)$_POST['age'];
echo <<<EOB
Hi $Oname, you are $Oage years old.
EOB;
} ?>