Advertisement
Ortund

Untitled

Jul 1st, 2016
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.41 KB | None | 0 0
  1. <?php
  2.     $errors = ________ // put your error messages in here
  3. ?>
  4. <html>
  5. <head>
  6. <title>whatevers</title>
  7. </head>
  8. <body>
  9.     <form>
  10.  
  11.     </form>
  12.     <?php
  13.         if ($errors.length >= 1) {
  14.             // build in your error markup here
  15.             echo '<div class=\"errors\">';
  16.             echo '<ul>';
  17.             foreach ($error in $errors) { // assumes $errors is an array
  18.                 echo '<li>'.$error.'</li>';
  19.             }
  20.             echo '</ul>';
  21.         }
  22.     ?>
  23. </body>
  24. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement