Viewing file: EditSalary.php (2.1 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include("../include/FunctionDB.php");
ConnectDB();
$Costt_1_temp1 = $Costt_1;
$Costt_2_temp2 = $Costt_2;
$Costt_3_temp3 = $Costt_3;
$Costt_4_temp4 = $Costt_4;
$Costt_5_temp5 = $Costt_5;
$Costt_6_temp6 = $Costt_6;
$Costt_7_temp7 = $Costt_7;
$Salary_1_temp8 = $Salary_1;
$Salary_2_temp9 = $Salary_2;
$Salary_3_temp10 = $Salary_3;
$Costt_salary = $Costt_1_temp1+ $Costt_2_temp2 + $Costt_3_temp3 + $Costt_4_temp4 + $Costt_5_temp5 + $Costt_6_temp6 + $Costt_7_temp7 + $Salary_1_temp8 + $Salary_2_temp9 + $Salary_3_temp10;
/////insert
$Costt_8_temp8 = $Costt_8;
$Costt_9_temp9 = $Costt_9;
$Costt_10_temp10 = $Costt_10;
$Costt_11_temp11 = $Costt_11;
$Costt_12_temp12 = $Costt_12;
$Costt_13_temp13 = $Costt_13;
$Costt_14_temp14 = $Costt_14;
$Costt_15_temp15 = $Costt_15;
$Costt_16_temp16= $Costt_16;
$Costt_17_temp17 = $Costt_17;
$Costt_18_temp18 = $Costt_18;
$Costt_19_temp19 = $Costt_19;
$Costt_to = $Costt_8_temp8 + $Costt_9_temp9 + $Costt_10_temp10 + $Costt_11_temp11 + $Costt_12_temp12 + $Costt_13_temp13 + $Costt_14_temp14 + $Costt_15_temp15 + $Costt_16_temp16 + $Costt_17_temp17 + $Costt_18_temp18 + $Costt_19_temp19;
///// Costt - Coo
$Costt_salary_temp1 = $Costt_salary;
$Costt_to_temp2 = $Costt_to;
$Costt_total = $Costt_salary_temp1 - $Costt_to_temp2;
$strSQL="UPDATE salary_repot_tb SET Start_mont='$Start_mont',Start_year='$Start_year',Salary_1='$Salary_1',Salary_2='$Salary_2',Salary_3='$Salary_3',Costt_1='$Costt_1',Costt_2='$Costt_2',Costt_3='$Costt_3',Costt_4='$Costt_4',Costt_5='$Costt_5',Costt_6='$Costt_6',Costt_7='$Costt_7',Costt_8='$Costt_8',Costt_9='$Costt_9',Costt_10='$Costt_10',Costt_11='$Costt_11',Costt_12='$Costt_12',Costt_13='$Costt_13',Costt_14='$Costt_14',Costt_15='$Costt_15',Costt_16='$Costt_16',Costt_17='$Costt_17',Costt_18='$Costt_18',Costt_19='$Costt_19',Costt_salary='$Costt_salary',Costt_to='$Costt_to',Costt_total='$Costt_total' Where Code='$Code' " ;
$result = mysql_query($strSQL) or die("Update Error $strSQL".mysql_error());
header("Location:MonnyList.php?Start_year=$Start_year&Start_mont=$Start_mont");
CloseDB();
?>
|