daily pastebin goal
75%
SHARE
TWEET

Untitled

a guest Jun 18th, 2017 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3. <title>Show Error Message</title>
  4. </head>
  5. <body>
  6. <table cellspacing=3 cellpadding=3>
  7. <form action="" method="post">
  8.  
  9. <tr><td>Username:</td><td><input type="text" name="input1" size=20></td></tr>
  10. <tr><td>Password:</td><td><input type="password" name="input2" size=20></td></tr>
  11. <tr><td>&nbsp;</td><td><input type="submit" name="submit" value="Login!"></td></tr>
  12.  
  13. </form>
  14. </table>
  15. </body>
  16. </html>
  17. <?php
  18. if(isset($_POST['submit'])){
  19. $error_msg="";
  20. $input1=$_POST['input1'];
  21. $input2=$_POST['input2'];
  22.     if($input1==""){
  23.     $error_msg .= "You need to enter username";
  24.     }
  25.     else {
  26.     $error_msg="Username is Filled!";
  27.     }
  28. }
  29. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top