<html> <head> <title> test post </title> </head> <body> <?php if (!empty($_POST['name'])) { echo "Greetings, {$_POST['name']}, and welcome!"; } echo "test print ---- {$_POST['name']} {$PHP_SELF}-----"; print $PHP_SELF; ?> <form action = "<?php $PHP_SELF; ?>" method = "post"> Enter your name: <input type = "text" name = "name" /> <input type = "submit" /> </form> </body> </html>