prepare("SELECT * FROM residents WHERE id = ?"); $stmt->execute([$resident_id]); $resident = $stmt->fetch(PDO::FETCH_ASSOC); if (!$resident) { header("Location: staff_dashboard.php"); exit; } // Fetch action plans for the resident $action_plan_stmt = $pdo->prepare("SELECT * FROM action_plans WHERE resident_id = ? ORDER BY created_at DESC"); $action_plan_stmt->execute([$resident_id]); $action_plans = $action_plan_stmt->fetchAll(PDO::FETCH_ASSOC); // Fetch case notes for the resident $case_notes_stmt = $pdo->prepare("SELECT * FROM case_notes WHERE resident_id = ? ORDER BY created_at DESC"); $case_notes_stmt->execute([$resident_id]); $case_notes = $case_notes_stmt->fetchAll(PDO::FETCH_ASSOC); ?>
Name:
Email:
Phone:
Program:
Status:
Date of Birth:
| Title | Status | Due Date | Action |
|---|---|---|---|
| No action plans found. | |||
| View/Edit | |||