include '../conx.php'; $sub = $_POST["subject"]; $type = $_POST["slctype"]; $link = $_POST["pub_link"]; $dt = $_POST["date"]; $dep = $_POST["slcDep"]; $p_id = $_POST["slcPer"]; // เพิ่มลงฐานข้อมูล $sql = "INSERT INTO publish (pub_supject, pub_type_id, pub_link, pub_date, dep_id, p_id) VALUES ('".$sub."', '".$type."', '".$link."', '".$dt."', '".$dep."', '".$p_id."')"; /*$sql_add = "insert into publish set pub_supject = '$sub'; pub_type_id = '$type'; pub_link = '$link'; pub_date = '$dt'; ";*/ echo $sql_add; mysql_query("SET NAMES utf8",$connect); mysql_query($sql) or die(mysql_error()); echo ""; ?>