<?php session_start(); include_once "helper.php"; include_once "connector.php"; credit_to_akbarsahata($dbh); $salted = salter($_SESSION['credit']['salt'], "adminportal2"); echo md5($salted);
<?php session_start(); require_once "connector.php"; require_once "helper.php"; $data[] = $_POST['username']; $data[] = md5(salter($_SESSION['credit']['salt'], $_POST['password'])); $query = "SELECT * FROM portal_upload.user WHERE (username = ?) AND (password = ?)"; $ps = $dbh->prepare($query); $ps->execute($data); if ($ps->rowCount() == 1) { $_SESSION['login'] = $ps->fetch(); header("location:/portal_upload/administrator"); } else { echo '<script>alert("Sorry, wrong username/password!");history.go(-1);</script>'; }