Mini Shell
<?php
include '../db/database.php';
$year1 = $_GET['year1'];
$year=(date("Y")+543);
$sql = "INSERT INTO subject (subject_class_id,subject_name,credit,subject_code,academic_year,course) SELECT subject_class_id,subject_name,credit,subject_code,$year,course FROM subject WHERE academic_year = '$year1'";
$result = mysqli_query($link2, $sql);
if ($result){
echo "<script>window.location='subject.php';</script>";
} else {
echo "<script>alert('เกิดข้อผิดผลาด ! ไม่สามารถบันทึกข้อมูลได้');window.location='subject.php';</script>";
}
Zerion Mini Shell 1.0