HEX
Server: Apache/2
System: Linux mail.lnwhostname.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
User: suanchonac (1128)
PHP: 7.4.25
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/suanchonac/domains/suanchon.ac.th/private_html/queen/actions/per-add.php
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?
include("../include/inc_config.php");
include("../include/class/database.class.php");

$db=new database();
if($_POST['name']==""){
	$error.="<h24>โปรดกรอก</h24> <h25>ชื่อ - สกุล</h25><br/>";
}
if($_POST['position']==""){
	$error.="<h24>โปรดกรอก</h24> <h25>ข้อความ</h25><br/>";
}

/*$oil=$_POST["name"];
echo "$oil";
$oil=$_POST["position"];
echo "$oil";*/


$sql="INSERT INTO `suanchonac_queen`.`people` (`id_queen`,`name_queen`,`text_people`)
VALUES ('NULL','".$_POST['name']."','".$_POST['position']."')";

if($error==""){
	if($db->mysqli_query($sql)){
		$message="เพิ่มข้อมูลสำเร็จ";
		echo "<script>alert('ระบบทำการเพิ่มข้อมูลสำเร็จ');</script>";
		echo '<meta http-equiv="refresh" content="0;URL=http://www.suanchon.ac.th/">';
	} else{
		$error.="ไม่สามารถบันทึกข้อมูลได้ <br/>";

	}
}
if($error!=""){
	echo "<script>alert('ไม่สามารถเพิ่มข้อมูลได้');</script>";
	echo'<meta http-equiv="refresh" content="0;URL=http://suanchon.ac.th/queen/main/add-per.php">';
}
?>