Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "koneksi.php";
- $username = $_POST['user'];
- $password = $_POST['pass'];
- $nip = $_POST['nip'];
- $query = mysql_query("SELECT COUNT(username) AS jumlah FROM tb_user
- WHERE username='$username' AND password='".md5( $password )."'");
- $data = mysql_fetch_array($query);
- $nip=$_POST['nip'];
- if ($data['jumlah'] >= 1){
- session_start();
- $_SESSION['username'] = $username;
- $_SESSION['password'] = $password;
- $_SESSION['nip'] = $nip;
- $username = $_SESSION['username'];
- header('location:admin/index.php');
- } else {
- header('location:index.html');
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement