Skip to content

helloworld.php

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
<html>
 <head>
  <title>Personalized Hello World</title>
 </head>
 <body>
  <?php
      if(!empty($_POST['name'])) {
          echo "Greetings, {$_POST['name']}, and welcome.";
      }
  ?>
  <form action="<?php $PHP_SELF; ?>" method="post">
      Enter your name: <input type="text" name="name" />
    <input type="submit" />
  </form>
 </body>
</html>