document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <?php
  2. session_start();
  3.  
  4. if (!empty($_SESSION['email'])) {
  5. header('location:index.php?hal=ubahdata');
  6. }
  7. ?>
  8. <html>
  9. <head>
  10. <title></title>
  11. <link rel="stylesheet" type="text/css" href="css/bootstrap.css">
  12. <script type="text/javascript" src="js/jquery.js"></script>
  13. <script type="text/javascript" src="js/bootstrap.js"></script>
  14. </head>
  15. <center>
  16. <body>
  17.  
  18. <h1>Login</h1>
  19.  
  20. <?php
  21. //kode php ini kita gunakan untuk menampilkan pesan eror
  22. if (!empty($_GET['error'])) {
  23. if ($_GET['error'] == 1) {
  24. echo '<h3>Username dan Password belum diisi!</h3>';
  25. } else if ($_GET['error'] == 2) {
  26. echo '<h3>Username belum diisi!</h3>';
  27. } else if ($_GET['error'] == 3) {
  28. echo '<h3>Password belum diisi!</h3>';
  29. } else if ($_GET['error'] == 4) {
  30. echo '<h3>Username dan Password tidak terdaftar!</h3>';
  31. }
  32. }
  33.  
  34.  
  35.  
  36. ?>
  37.  
  38. <form action="index.php?hal=otentikasi" name="login" method="post">
  39. <div class="form-group">
  40. <label for="email">Email:</label>
  41. <input type="email" class="form-control" id="email" name="email">
  42. </div>
  43. <div class="form-group">
  44. <label for="pwd">Password:</label>
  45. <input type="password" class="form-control" id="password" name="password">
  46. </div>
  47. <button type="submit" class="btn btn-default">Submit</button>
  48. </form>
  49.  
  50.  
  51. </body>
  52. </center>
  53. </html>
');