<!DOCTYPE html>
<html>
<head>
<title>Post HTML Form</title>
</head>
<body>
<div>
<?php
if ( ! empty( $_POST['user_name'] ) ) {
print "Your name is: ".$_POST['user_name'];
}
?>
<form method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
<p>
What is your name: <input type="text" name="user_name" />
</p>
</form>
</div>
</body>
</html>
<!--
run
Your name is: Fox
-->