Advertisement
Guest User

Untitled

a guest
Jul 10th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.17 KB | None | 0 0
  1. <?php include("header.inc");?>
  2. <table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  3.     <tr>
  4.         <td><p class= "Instruction">Please login by entering your email address and password</p></td>
  5.     </tr>
  6. </table>
  7.             <form action="index.php" method="post">
  8.                 <table class="login">
  9.                     <tr>
  10.                         <td>
  11.                             <label for="email" class="Instruction">Email Address:</label>
  12.                         </td>
  13.                         <td>
  14.                             <input type="text" name="email" id="email" />
  15.                         </td>
  16.                     </tr>
  17.                     <tr>
  18.                         <td>
  19.                             <label for="password" class="Instruction">Password:</label>
  20.                         </td>
  21.                         <td>
  22.                             <input type="password" name="password" id="password" />
  23.                         </td>
  24.                     </tr>
  25.                     <tr>
  26.                         <td>
  27.                             <input type="submit" name="submit" value="Login" />
  28.                         </td>
  29.                         <td>
  30.                             <input type="reset" name="clear" value="Clear" />
  31.                         </td>
  32.                     </tr>
  33.                 </table>
  34.             </form>
  35.            
  36.                 <?php if(isset($_POST['submit']))                                  
  37.                         {
  38.                                $email = preg_replace('/[^A-Za-z0-9 ]/','', $_POST['email']);
  39.                                $password = preg_replace('/[^A-Za-z0-9 ]/','',$_POST['password']);
  40.                                //$session_username = $_SESSION['username'];
  41.  
  42.                                if(!$_POST['email'])                                      
  43.                                {
  44.                                       echo "Please enter a username <br/>";                  
  45.                                }
  46.  
  47.                                if(!$_POST['password'])                                      
  48.                                {
  49.                                       echo"Please enter a password <br/>";                  
  50.                                }
  51.                         }  
  52.                     ?>     
  53. <?php include("footer.inc") ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement