<?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";
global $pdo;
$sql = "SELECT * FROM facultad WHERE facultad_id = :idFacultad";
$params = [':idFacultad' => $_POST['id_facultad']];
echo json_encode(query($sql, $params, false));
