<?php

    $classId = $_REQUEST['q'];
    include($_SERVER['DOCUMENT_ROOT'] ."/_ps2020/config/connect.php");
    $className = "Not-Found";
    $result = $conn->query("SELECT * FROM school_class WHERE class_id = '$classId'");
    if($result){
        while($row = $result->fetch_assoc()){
            $className = $row['class_name'];
        }
    }
    echo $className;
    $conn->close();

?>