
<?php
session_start();
$tetramino=$_SESSION['tetramino'];
$teacher=$_SESSION['usr'];
include('dbconnect.php');

//collect the passed id
$less=$_GET['mathsubid'];
$arr = explode("/", $less);
$tmima = rtrim(ltrim($arr[0]));
$subject = rtrim(ltrim($arr[1]));

mysqli_query($con,"delete from aksinfo where type='' and pmpteacher='$teacher'" );
$sql1=mysqli_query($con,"select * from aksinfo where pmpteacher='$teacher' and tmima='$tmima' and subject='$subject' and tetramino='$tetramino' ");
$disp="new";
echo "<option value='$disp'>Νέα Αξιολόγηση</option>";
while($row = mysqli_fetch_array($sql1))
{    
    $type=$row['type'];
	$num=$row['num'];
	$code=$row['code'];
	$date=$row['date'];
	$disp=$type."/".$date."/".$code;
    echo "<option value='$disp'>$disp</option>";
}
