<?php ob_start(); session_start(); ?>
<?php
include "layouts/db_connect.php";

		 if(isset($_SESSION['code'])) {
	  $code = $_SESSION['code'];
	  $scode = $_SESSION['code'];
	   $mfin = $_SESSION['mfin'];
		$staff = $_SESSION['name'];
		 $postt = $_SESSION['postt'];
	}
	
$cod = $_GET['cod'];
$sql = mysqli_query($conn, "select * from customer where code = '$cod'");
$row2 = mysqli_fetch_array($sql);

$insert=mysqli_query($conn, "insert into customercan(name,code,fname,uimg,edu,exp,expr,year,yearr,act,inter,id,desig,mail,mno,pwd)
values('".$row2['name']."','".$row2['$code']."','".$row2['fname']."','".$row2['uimg']."','".$row2['edu']."','".$row2['exp']."','".$row2['expr']."','".$row2['year']."','".$row2['yearr']."','".$row2['act']."','".$row2['inter']."','".$row2['id']."','".$row2['desig']."','".$row2['mail']."','".$row2['mno']."','".$row2['pwd']."')");



mysqli_query($conn, "DELETE FROM customer where code = '$cod'");						


echo "<script>alert('Cancelled successfully');window.location.href='newemp.php'</script><br>";

?>


