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/insertmodal_crown.php

<?php

    include '../db/database.php';
    include 'function_date.php';
    $historycrownID = $_POST['historycrownID'];
      
    $crownID= $_POST['crownID'];
    $year = $_POST['year'];
    $date = $_POST['date'];
   
    $date1 = mydate($date);
    
        $sql = "UPDATE `history_crown` SET `crownID`='$crownID', `year`='$year', `date`='$date1' where `historycrownID`='$historycrownID'";
        $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