Advertisement
anticims19

login.php

Aug 11th, 2015
369
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.66 KB | None | 0 0
  1. <?php
  2.     error_reporting(0);
  3.     session_start();
  4.     if($_SESSION['username']){
  5.     header("location:index.php");
  6. }else{
  7. ?>
  8.  
  9. <html>
  10. <head>
  11.     <title>Halaman Login</title>
  12.     <link href="css/bootstrap.css" rel="stylesheet">
  13. <style type="text/css">
  14. body{
  15.     font-family: arial;
  16.     font-size: 14px;
  17.     background-color: #222;
  18. }  
  19. #utama{
  20.     width: 20%;
  21.     margin: 0 auto;
  22.     margin-top: 12%;
  23.    
  24. }
  25. #judul{
  26.     padding: 15px;
  27.     text-align: center;
  28.     color: #fff;
  29.     font-size: 20px;
  30.     background-color: #339966;
  31.     border-top-right-radius: 10px;
  32.     border-top-left-radius: 10px;
  33.     border-bottom: 3px solid #336666;
  34. }
  35. #isi{
  36.     background-color: #ccc;
  37.     padding: 20px;
  38.     border-bottom-left-radius: 10px;
  39.     border-bottom-right-radius: 10px;
  40. }
  41. input{
  42.     padding: 10px;
  43.     border: 0;
  44. }
  45. .lg{
  46.     width: 220px;
  47. }
  48. /*
  49. .btn{
  50.     background-color: #339966 ;
  51.     border-radius: 10px;
  52.     color: #fff;
  53. }
  54. .btn:hover{
  55.     background-color: #336666 ;
  56.     cursor: pointer;
  57. }*/
  58. </style>
  59. </head>
  60. <body>
  61. <div id="utama">
  62.     <div id="judul">
  63.         Halaman Login
  64.     </div>
  65.     <div id="isi">
  66.         <form action="login-submit.php" method="post">
  67.             <div>
  68.                 <input class="form-control" type="text" name="username" placeholder="Username" autofocus>
  69.             </div>
  70.             <div style="margin-top: 10px;">
  71.                 <input class="form-control" type="password" name="password" placeholder="Password">
  72.             </div>
  73.             <div style="margin-top: 10px;">
  74.                 <button type="submit" name="btnSubmit" class="btn btn-primary btn-sm"><span class="glyphicon glyphicon-log-in" aria-hidden="true"></span>  Login</button> <!-- <input class="btn" type="submit" name="btnSubmit" value="Login"> -->
  75.             </div>
  76.         </form>
  77.  
  78.        
  79.     </div>
  80. </div>
  81. </body>
  82. </html>
  83. <?php
  84. }
  85. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement