<?php
include 'conexao.php';

header('Content-Type: application/json');

try {
    // Apaga todos os horários da tabela
    $conn->query("DELETE FROM horario");
    echo json_encode(['success' => true]);
} catch (Exception $e) {
    echo json_encode(['success' => false, 'error' => $e->getMessage()]);
}

$conn->close();
?>