Viewing file: InsertCostEstimates.php (3.84 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
";
echo " กรุณาทำการ Login ก่อน ";
echo "";
exit();
}
else {
/** Configuration */
require_once( "../configuration.php" );
require_once( $_Config_absolute_path . "/includes/framework.php" );
require_once( "../include/Function.php" );
require_once( "../includes/FunctionDB.php" );
/** Create Database Object */
$dbObj = new DBConn;
$maNo = $_REQUEST['maNo'];
$Teacher_code = $_POST['Teacher_code'];
$Training_code = $_POST['Training_code'];
$codeId = $_POST['codeId'];
$Date = dmyE2ymdT($_REQUEST['mDate']);
$Smtotal = $_POST['Smtotal'];
$STtotal = $_POST['STtotal'];
$Vehicletotal = $_POST['Vehicletotal'];
$Crgestotal = $_POST['Crgestotal'];
/*-----------------*/
$sql11 = " SELECT * FROM formaoffice Where maNo='$maNo' ";
$result11 = mysql_query($sql11);
while ($rs11 = mysql_fetch_array($result11)){
$sql ="INSERT IGNORE INTO form_costestimates(Cost_id, Teacher_code, Training_code, codeId, Smtotal, STtotal, Vehicletotal, Crgestotal) ";
$sql =$sql. "VALUE ( '','".$rs11['Teacher_code']."', '".$rs11['Training_code']."', '".$rs11['codeId']."' , '$Smtotal' , '$STtotal' , '$Vehicletotal' , '$Crgestotal') " ;
$res = mysql_query ($sql) or die ("$sql Insert Has incorrect".mysql_error());
}
} # else
?>
MIS -- Teacher
freeresult($result);
/** Close the Database */
$dbObj->disconn();
/** Unset Class */
unset($dbObj);
?> bool(false)
|