Skip to content

Instantly share code, notes, and snippets.

@wichaksono
Created November 4, 2018 06:13
Show Gist options
  • Save wichaksono/1756a11174fab7db59bf778b4f7a3fcd to your computer and use it in GitHub Desktop.
Save wichaksono/1756a11174fab7db59bf778b4f7a3fcd to your computer and use it in GitHub Desktop.
<?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