Initial Commit

This commit is contained in:
Vinlio Andriarles
2026-06-02 13:15:29 +07:00
commit 3ebceba0b8
31 changed files with 2058 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
<?php
session_start();
include '../config/koneksi.php';
$username = $_POST['username'];
$password = $_POST['password'];
$stmt = mysqli_prepare($koneksi, "SELECT * FROM admin_ibadah WHERE username = ?");
mysqli_stmt_bind_param($stmt, "s", $username);
mysqli_stmt_execute($stmt);
$result = mysqli_stmt_get_result($stmt);
$data = mysqli_fetch_assoc($result);
if ($data) {
if (password_verify($password, $data['password'])) {
$_SESSION['id'] = $data['id'];
$_SESSION['nama'] = $data['nama_lengkap'];
$_SESSION['id_ibadah'] = $data['id_ibadah'];
header("Location: ../index.php");
exit;
} else {
header("Location: login.php?error=1");
exit;
}
}
mysqli_stmt_close($stmt);
header("Location: login.php?error=2");
exit;
?>