Advertisement
Guest User

Untitled

a guest
Aug 15th, 2018
363
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.69 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <link href="https://fonts.googleapis.com/css?family=Archivo" rel="stylesheet">
  5.     <title>
  6.         Admin Panel
  7.     </title>
  8.     <style>
  9.     body{font-family: Archivo,sans-serif;}
  10.     table{margin-top:10%;border:1px solid black;border-radius:8px;}
  11.     table thead tr th{
  12.         border-style: none none solid none;
  13.         border-width:1.5px;
  14.         padding:15px 150px;
  15.     }
  16.     table tbody tr td{padding:3.5px 7.5%;}
  17.     table tbody tr td input[type = "submit"]{
  18.         border:none;
  19.         padding:4px 50px;
  20.     }
  21.     table tfoot tr th{
  22.         border-style:solid none none none;
  23.         border-width:1.5px;
  24.         padding:10px 150px;
  25.     }
  26.     </style>
  27. </head>
  28. <body>
  29.     <center>
  30.         <form action="" method="POST">
  31.             <table>
  32.                 <thead>
  33.                     <tr>
  34.                         <th colspan="2"> admin panel </th>
  35.                     </tr>
  36.                 </thead>
  37.                 <tbody>
  38.                     <tr>
  39.                         <td>username</td>
  40.                         <td> <input type="text" name="user" placeholder="username"> </td>
  41.                     </tr>
  42.                     <tr>
  43.                         <td>password</td>
  44.                         <td> <input type="password" name="pass" placeholder="password"> </td>
  45.                     </tr>
  46.                     <tr>
  47.                         <td colspan="2">
  48.                             <center> <input type="submit" name="submit" value="login"> </center>
  49.                         </td>
  50.                     </tr>
  51.                 </tbody>
  52.                 <tfoot>
  53.                     <tr>
  54.                         <th colspan="2"> <a href="http://fawkes.esy.es/">http://fawkes.esy.es </a> </th>
  55.                     </tr>
  56.                 </tfoot>
  57.             </table>
  58.         </form>
  59.     </center>
  60. </body>
  61. </html>
  62. <?php
  63. include_once("kelas_login.php");
  64. $login = new login;
  65.  
  66. $user = trim($_POST["user"]);
  67. $pass = trim($_POST["pass"]);
  68.  
  69. if( isset($_POST["submit"]) ):
  70.     $login -> username = $user;
  71.     $login -> password = $pass;
  72.     if( $login -> check_login() ){
  73.         echo "succesfully logged in!";
  74.     }else{
  75.         echo "fail to log in!";
  76.     }
  77. endif;
  78. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement