<form action="action.php" method="POST">
Your name: <input type=text name=name><br>
You age: <input type=text name=age><br>
<input type=submit>
</form>
<?php
$name = htmlspecialchars($_POST['name']);
$age = htmlspecialchars($_POST['age']);
?>
Hi <?php echo $name ?>.
You are <?php echo $age ?> years old.