prepare("INSERT INTO coach_recurring_availability (coach_id, day_of_week, start_time, end_time) VALUES (?, ?, ?, ?)"); $stmt->execute([$coach_id, $day_of_week, $start_time, $end_time]); header('Location: dashboard.php?status=recurring_added'); } catch (PDOException $e) { header('Location: dashboard.php?status=error'); } } else { header('Location: dashboard.php?status=error'); } } else { header('Location: dashboard.php'); } exit;