<?php 
session_start();
include 'dbc.php';
$userid=$_SESSION["userid"];
$teacher_id=$_POST["teacher_id"];
$app_file1=$_POST["app_file1"];
$app_file2=$_POST["app_file2"];
$app_file3=$_POST["app_file3"];
$app_file4=$_POST["app_file4"];
$app_file5=$_POST["app_file5"];
$app_file6=$_POST["app_file6"];
$app_file7=$_POST["app_file7"];
$app_file8=$_POST["app_file8"];
$barcode=$_POST["barcode"];


$img_name1=$teacher_id . "_" . $_FILES["app_file1"]["name"];
move_uploaded_file($_FILES["app_file1"]["tmp_name"],"app_images3/".$img_name1);

$img_name2=$teacher_id . "_" . $_FILES["app_file2"]["name"];
move_uploaded_file($_FILES["app_file2"]["tmp_name"],"app_images4/".$img_name2);

$img_name3=$teacher_id . "_" . $_FILES["app_file3"]["name"];
move_uploaded_file($_FILES["app_file3"]["tmp_name"],"app_images5/".$img_name3);

$img_name4=$teacher_id . "_" . $_FILES["app_file4"]["name"];
move_uploaded_file($_FILES["app_file4"]["tmp_name"],"app_images6/".$img_name4);

$img_name5=$teacher_id . "_" . $_FILES["app_file5"]["name"];
move_uploaded_file($_FILES["app_file5"]["tmp_name"],"app_images7/".$img_name5);

$img_name6=$teacher_id . "_" . $_FILES["app_file6"]["name"];
move_uploaded_file($_FILES["app_file6"]["tmp_name"],"app_images8/".$img_name6);

$img_name7=$teacher_id . "_" . $_FILES["app_file7"]["name"];
move_uploaded_file($_FILES["app_file7"]["tmp_name"],"app_images9/".$img_name7);

$img_name8=$teacher_id . "_" . $_FILES["app_file8"]["name"];
move_uploaded_file($_FILES["app_file8"]["tmp_name"],"app_images10/".$img_name8);
echo $img_name1;
$sql = "update teacher set 
app_file1='$img_name1',app_file2='$img_name2',app_file3='$img_name3',app_file4='$img_name4',app_file5='$img_name5',app_file6='$img_name6',app_file7='$img_name7',app_file8='$img_name8'  where id='$teacher_id'";
$conn->query($sql);




header("location:Edit_Del_Teacher.php");

?>
