prepare("SELECT * FROM users WHERE username = ? LIMIT 1"); $stmt->bind_param("s", $username); $stmt->execute(); $result = $stmt->get_result(); if ($result && $result->num_rows > 0) { $user = $result->fetch_assoc(); // Check hashed password if (password_verify($password, $user['password'])) { $_SESSION['role'] = $user['role']; $_SESSION['username'] = $user['username']; $_SESSION['avatar'] = $user['avatar']; header("Location: index.php"); exit; } } $error = "Username atau password salah!"; } ?>
Masuk untuk mengelola data WebGIS
← Kembali ke PetaAkun Admin
password