<?php
session_start();
include 'dbc.php';

date_default_timezone_set("Asia/Karachi");
$today=date("Y-m-d");
$month = date("m",strtotime($today));
		$year = date("Y",strtotime($today));
		 $month_name = date("F", mktime(0, 0, 0, $month, 10));
		 $my=$month_name . " " . $year;
$username=$_SESSION["username"];
$userid=$_SESSION["userid"];
$saldate=$_POST["saldate"];
$month_name=$_POST["month_name"];
$sess1=$_POST["sess1"];

$size = count($_POST['monthly_salary']);
$i = 0;
while ($i < $size) {
$id= $_POST['id'][$i];
	$tech_name = $_POST['tech_name'][$i];
	 $father_name = $_POST['father_name'][$i];
	  $class_name = $_POST['class_name'][$i];
	  $monthly_salary = $_POST['monthly_salary'][$i];


	$loan= $_POST['loan'][$i];
	$security = $_POST['security'][$i];
	
	
	  
			
	$sql1 = "update teacher set 
loan='$loan' , security='$security' where id='$id'";
$conn->query($sql1);

	++$i;

// do the update and print out some info just to provide some visual feedback


} 

header("location:Edit_Del_Teacher.php");
//echo"<td> <a href ='open_customers.php?areaname=$party_area'>Click to Main Dashboard</a>";
?>
