prepare($sql); $stmt->execute([ $_POST['first_name'], $_POST['last_name'], $_POST['email'], $_POST['phone_number'], $_POST['date_of_birth'], $_POST['program'], $_POST['status'], $resident_id ]); header("Location: resident_view.php?id=" . $resident_id . "&success=2"); // Success code for update exit; } catch (PDOException $e) { $error_message = "Database error: Could not update resident. " . $e->getMessage(); } } // Fetch resident details to pre-fill the form $stmt = $pdo->prepare("SELECT * FROM residents WHERE id = ?"); $stmt->execute([$resident_id]); $resident = $stmt->fetch(PDO::FETCH_ASSOC); if (!$resident) { header("Location: staff_dashboard.php"); exit; } ?> Edit Resident - Continuum of Healing

Edit Resident Information

← Back to View