Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'config.php';
- $username = $_POST['username'];
- $password = md5($_POST['password']);
- $login = mysql_query("select * from user where username='$username' and password='$password'");
- $cek = mysql_num_rows($login);
- if($cek > 0){
- session_start();
- $_SESSION['username'] = $username;
- $_SESSION['status'] = "login";
- header("location:admin/index.php");
- }else{
- header("location:index.php");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement