<?php
session_start();
ob_start();
$menu=$_SESSION['menu'];  
?>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
require("dbconnect.php");
$code = $_SESSION['code'];
//.................................
$ekd=$_SESSION['ekd'];

$result = mysqli_query($con,"SELECT pmp,tmima,p1,p2,p3,p4,p5,p6,p7 FROM ekdilosistu WHERE code = '$code' ");
$rowcount=mysqli_num_rows($result);
//..................................
$i=1;
 while($row = mysqli_fetch_array($result))
     {
	 $pmp[$i]=$row['pmp'];
	 $i++;}
//..................................
if (isset($_POST['liststu'])) 
{ 
$mt=$_POST['ok'];
$pmpg=array_diff($pmp,$mt);
print_r($pmpg);
$c=count($pmpg);

foreach ($pmpg as $pm)
{

mysqli_query($con,"DELETE FROM ekdilosistu WHERE code='$code' and pmp='$pm'");	
}
}
include "epmathnew.php";


//echo "<br>"."<br>"."<br>"." ΚΛΕΙΣΤΕ ΤΟ ΠΑΡΑΘΥΡΟ ΓΙΑ ΝΑ ΣΥΝΕΧΊΣΕΤΕ";
?>



</body>
</html>