Created
November 4, 2018 06:13
-
-
Save wichaksono/1756a11174fab7db59bf778b4f7a3fcd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
require 'config.php'; | |
if ( | |
isset($_POST['username']) && | |
$_POST['username'] == 'admin' && | |
isset($_POST['password']) && | |
$_POST['password'] == '12345' | |
) { | |
$_SESSION['user_login'] = 'admin'; | |
$_SESSION['sess_id'] = '001'; | |
$_SESSION['nama'] = 'Admin'; | |
header('location:on-admin/'); | |
} else { | |
header('location:login.php'); | |
exit(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment