| Server IP : 134.236.49.22 / Your IP : 216.73.216.114 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/questionnaire/ |
Upload File : |
<?php
//สำหรับ รับข้อมูลที่ POST มาจา Cloud Server
include 'connect.php';
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
$objDB = mysql_select_db("questionnaire");
mysql_query("SET NAMES 'tis620'; ");
switch ($_POST['dept']) {
case 'dental':
$ans = iconv( 'UTF-8','TIS-620', $_POST["ans"]);
$strSQL = "INSERT INTO dental";
$strSQL .="(no_1,no_2,no_3,no_4,no_5,no_6,no_7,no_8,no_9,no_10,ans,vst)";
$strSQL .=" VALUES ";
$strSQL .="('".$_POST["n1"]."','".$_POST["n2"]."','".$_POST["n3"]."','".$_POST["n4"]."','".$_POST["n5"]."','".$_POST["n6"]."','".
$_POST["n7"]."','".$_POST["n8"]."','".$_POST["n9"]."','".$_POST["n10"]."','".$ans."','".$_POST["vst"]."')";
break;
case 'phar':
$strSQL = "INSERT INTO phar (result,vst) VALUES (".$_POST["result"].",'".$_POST["vst"]."')";
break;
default:
$strSQL ='';
}
if ($strSQL !==''){
$objQuery = mysql_query($strSQL) or die(mysql_error());
if($objQuery) echo " OK";
mysql_close($objConnect);
}
echo 'NO';
?>