Advertisement
Guest User

Untitled

a guest
Nov 8th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <?php
  2. session_start();
  3. if(isset($_POST['kirim'])){
  4. $username = $_POST['username'];
  5. $password = $_POST['password'];
  6. //user = admin pass = 123
  7. if(($username == "admin") && ($password == "123")){
  8. //login sukses
  9. $_SESSION['login'] = "admin";
  10. header("location:../../index.php?pesan=sukses");
  11. }else{
  12. //login gagal
  13. header("location:../../index.php?menu=login&level=admin&pesan=error");
  14. }
  15. }else{
  16. header("location:../../index.php");
  17. }
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement