Viewing file: EditCostEstimates.php (3.95 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 = $_REQUEST['Teacher_code'];
$Training_code = $_REQUEST['Training_code'];
$codeId = $_REQUEST['codeId'];
$Smtotal = $_POST['Smtotal'];
$STtotal = $_POST['STtotal'];
$Vehicletotal = $_POST['Vehicletotal'];
$Crgestotal = $_POST['Crgestotal'];
/*-----------------*/
$query8 = "SELECT * FROM form_costestimates WHERE Teacher_code = '$Teacher_code' AND codeId = '$codeId' AND Training_code = '$Training_code' ";
$result8 = mysql_query($query8);
$numrows =mysql_num_rows($result8);
if($numrows){
while($rs8 = mysql_fetch_array($result8)) {
$sql ="UPDATE form_costestimates SET Teacher_code='$Teacher_code' , Training_code='$Training_code' , codeId='$codeId' , Smtotal='$Smtotal', STtotal='$STtotal', Vehicletotal='$Vehicletotal', Crgestotal='$Crgestotal' WHERE Teacher_code = '$Teacher_code' AND codeId = '$codeId' AND Training_code = '$Training_code' ";
$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)
|