File "read_single.php"

Full path: /home2/santhos2/public_html/bharath-coe.firstmatrix.in.net/api/assessment_settings/read_single.php
File size: 446 B
MIME-type: text/x-php
Charset: utf-8

Download   Open   Back

<?php
require_once '../../config/config.php';
header('Content-Type: application/json');
try { if(!isset($_GET['id'])){ echo json_encode(null); exit; } $id=(int)$_GET['id']; $stmt=$pdo->prepare('SELECT * FROM subject_assessment_settings WHERE setting_id=?'); $stmt->execute([$id]); echo json_encode($stmt->fetch(PDO::FETCH_ASSOC)?:null); } catch(Throwable $e){ http_response_code(500); echo json_encode(['error'=>$e->getMessage()]); }
?>


PHP File Manager