Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <link href="https://fonts.googleapis.com/css?family=Archivo" rel="stylesheet">
- <title>
- Admin Panel
- </title>
- <style>
- body{font-family: Archivo,sans-serif;}
- table{margin-top:10%;border:1px solid black;border-radius:8px;}
- table thead tr th{
- border-style: none none solid none;
- border-width:1.5px;
- padding:15px 150px;
- }
- table tbody tr td{padding:3.5px 7.5%;}
- table tbody tr td input[type = "submit"]{
- border:none;
- padding:4px 50px;
- }
- table tfoot tr th{
- border-style:solid none none none;
- border-width:1.5px;
- padding:10px 150px;
- }
- </style>
- </head>
- <body>
- <center>
- <form action="" method="POST">
- <table>
- <thead>
- <tr>
- <th colspan="2"> admin panel </th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>username</td>
- <td> <input type="text" name="user" placeholder="username"> </td>
- </tr>
- <tr>
- <td>password</td>
- <td> <input type="password" name="pass" placeholder="password"> </td>
- </tr>
- <tr>
- <td colspan="2">
- <center> <input type="submit" name="submit" value="login"> </center>
- </td>
- </tr>
- </tbody>
- <tfoot>
- <tr>
- <th colspan="2"> <a href="http://fawkes.esy.es/">http://fawkes.esy.es </a> </th>
- </tr>
- </tfoot>
- </table>
- </form>
- </center>
- </body>
- </html>
- <?php
- include_once("kelas_login.php");
- $login = new login;
- $user = trim($_POST["user"]);
- $pass = trim($_POST["pass"]);
- if( isset($_POST["submit"]) ):
- $login -> username = $user;
- $login -> password = $pass;
- if( $login -> check_login() ){
- echo "succesfully logged in!";
- }else{
- echo "fail to log in!";
- }
- endif;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement