// login.php - Secure login for Vasudha session_start(); require_once 'db.php'; $error = ''; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $user = $_POST['username'] ?? ''; $pass = $_POST['password'] ?? ''; $stmt = $conn->prepare("SELECT id, password FROM users WHERE username = ?"); $stmt->bind_param("s", $user); $stmt->execute(); $result = $stmt->get_result(); if ($row = $result->fetch_assoc()) { if (password_verify($pass, $row['password'])) { $_SESSION['authenticated'] = true; $_SESSION['user_id'] = $row['id']; $_SESSION['username'] = $user; header('Location: index.php'); exit; } else { $error = "Incorrect credentials."; } } else { $error = "Account not found."; } } ?> Vasudha | Authentication
V

Vault Access

Enter Credentials to View Archives

Vasudha Heritage Network © 2026