<?php
require_once('conecta.php');

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

$vagaId = isset($_GET["id"]) ? intval($_GET["id"]) : 0;
$queryvaga = $pdo->query("SELECT * FROM vagas WHERE id = $vagaId");
$vagaFull = $queryvaga->fetchAll(PDO::FETCH_ASSOC);

echo json_encode($vagaFull);
