Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. <form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
  2. Name <input type='text' name='name' /><br>
  3. Email <input type='text' name='email' /><br>
  4. Age<input type='text' name='age' /><br>
  5. </form>
  6.  
  7. <?php
  8. if(empty($POST['name']))
  9. echo '<font color="red">Please enter your name.</font>';
  10. if(empty($POST['email']))
  11. echo '<font color="red">Please enter your email.</font>';
  12. if(empty($POST['age']))
  13. echo '<font color="red">Please enter your age.</font>';
  14.  
  15. <input type='submit' name='Done' /><br><br>
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement