ok

Mini Shell

Direktori : /home/ngwcolle/public_html/LIBRARY-NGWC/admin/ajax/
Upload File :
Current File : /home/ngwcolle/public_html/LIBRARY-NGWC/admin/ajax/chack_section.php

<?php
// session_start();
error_reporting(0);
// include('../includes/config.php');

include('../includes/dbconnection.php');
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
// if (strlen($_SESSION['adid']==0)) {
//   header('location:logout.php');
if(!empty($_POST))
{
    $section = $_POST['sectionid'];
    $class = $_POST['classid'];
    // $email = $_POST['email'];
        $query=$dbh->query("SELECT * from tblsection where id='$section' and classid='$class'");
        $row = $query->fetch(PDO::FETCH_ASSOC);
        $response=$row;
        // if($row['vacancy'] > 0){
        //     echo $row['vacancy'];
        //     // .' Seats Vacancy exists for this Section!';
        // } else{
        //     echo '0';
        // }
    // if($query->rowCount()>0)
    // {
    //     // echo $section;
    //     echo $query->rowCount();
    // }
    // else{
    //     echo($query->error);
    // }
    echo json_encode($response);
}
?>

Zerion Mini Shell 1.0