The source code of simpleForm.php : <html> <head><title>Polite Hello World!</title></head> <body> <?php if(!empty($_POST['name'])) { echo "Hello, {$_POST["name"]}, and welcome."; } ?> <form action ="simpleForm.php" method="post"> Enter your name: <input type="text" name="name" /> <input type="submit"/> </form> </body> </html>