PHP - Display The Error Messages


SUBMITTED BY: Guest

DATE: Oct. 7, 2014, 12:29 p.m.

FORMAT: Text only

SIZE: 828 Bytes

HITS: 1160

  1. <form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
  2. Name: <input type="text" name="name">
  3. <span class="error">* <?php echo $nameErr;?></span>
  4. <br><br>
  5. E-mail:
  6. <input type="text" name="email">
  7. <span class="error">* <?php echo $emailErr;?></span>
  8. <br><br>
  9. Website:
  10. <input type="text" name="website">
  11. <span class="error"><?php echo $websiteErr;?></span>
  12. <br><br>
  13. <label>Comment: <textarea name="comment" rows="5" cols="40"></textarea>
  14. <br><br>
  15. Gender:
  16. <input type="radio" name="gender" value="female">Female
  17. <input type="radio" name="gender" value="male">Male
  18. <span class="error">* <?php echo $genderErr;?></span>
  19. <br><br>
  20. <input type="submit" name="submit" value="Submit">
  21. </form>

comments powered by Disqus