topical media & game development

talk show tell print

basic-php-appendix-ch03ex01.php / php



  <html><head><title>My Title</title></head>
  <body>
  <?php
  if (isset(_POST[posted])) {
     echo "Thanks. Your first name is _POST[first_name] and your last name is _POST[last_name]";
  } else {
  ?>
  <h2>Please fill out this form</h2>
  <form method="POST" action="<?php PHP_SELF ?>">
  <input type="hidden" name="posted" value="true">
  First Name<input type="text" name="first_name"><br>
  Last Name<input type="text" name="last_name">
  <input type="submit" value="Send Info">
  </form>
  <?php
  }
  ?>
  </body>
  </html>
  
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.