<?php
$ruta = "../";
require_once "../class/c_login.php";

// check if the session is started
if (!isset($_SESSION['user']))
    die(json_encode(['error' => 'No se ha iniciado sesión']));

$user = unserialize($_SESSION['user']);
$ruta = "../";
require_once "../include/bd_pdo.php";
#$sql = "SELECT * FROM diasfestivos WHERE diasfestivos_id = :id";
$sql = "DELETE FROM diasfestivos WHERE diasfestivos_id = :id";
$params = [':id' => $_POST['id']];
echo json_encode(query($sql, $params, false));
