Mini Shell

Direktori : /var/www/vhosts/ccp.ac.th/smtp.ccp.ac.th/httpdocs/new/sp/admin/
Upload File :
Current File : /var/www/vhosts/ccp.ac.th/smtp.ccp.ac.th/httpdocs/new/sp/admin/insert_education.php

<?php

    include '../db/database.php';
    
    $teacheredID = $_POST['teacheredID'];
    $levelID = $_POST['levelID'];
    $degreeName = $_POST['degreeName'];
    $degreeSubject = $_POST['degreeSubject'];
    $degreeInstitution = $_POST['degreeInstitution'];
    $other = $_POST['other'];

   
   
  
    
    $sql = "INSERT INTO `education` (`teacheredID`, `levelID`, `degreeName`, `degreeSubject`, `degreeInstitution`, `other`) VALUES 
          ('$teacheredID', '$levelID', '$degreeName', '$degreeSubject', '$degreeInstitution', '$other')";
    $result = mysqli_query($link, $sql);
    
    if ($result) {
        header('Content-Type: application/json');
        echo json_encode(array('status' => 'success','message' => 'บันทึกข้อมูลเรียบร้อยแล้ว'));
    } else {
        header('Content-Type: application/json');
        $errors = "ไม่สามารถบันทึกข้อมูลได้";
        echo json_encode(array('status' => 'danger','message' => $errors));
    }

Zerion Mini Shell 1.0