<?php
$ruta = "../";
require_once "../include/bd_pdo.php";
global $pdo;
$sql = "SELECT * FROM materia
JOIN carrera using (carrera_id)
WHERE materia_id = :idMateria";
$params = ['idMateria' => $_POST['idmateria']];
echo json_encode(query($sql, $params, false));
?>