prepare("INSERT INTO check_ins (resident_id, mood_rating, journal_entry) VALUES (?, ?, ?)"); $stmt->execute([$resident_id, $mood_rating, $journal_entry]); header("Location: resident_dashboard.php?success=checkin_saved"); exit; } catch (PDOException $e) { header("Location: resident_dashboard.php?error=checkin_failed"); exit; }