<?php
include "scrinit.php";
include $menu;
?><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
table.myTable { border-collapse:collapse; }
table.myTable td, table.myTable th { border:1px solid black;padding:2px;font-size:11px; }
<p style="font-size:09px;"></p>
</style>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
$(function() {
 $("#tmimaid").bind("change", function() {
     $.ajax({
         url: "change.php",
         data: "tmimaid="+$("#tmimaid").val(),
         success: function(html) {
             $("#nameid").html(html);
         }
     });
 }); 
});
</script>
</head>
<body>
<h4>ΑΝΑΦΟΡΑ ΠΑΡΑΠΤΩΜΑΤΩΝ/ΤΙΜΩΡΙΩΝ</h4>
<?php
require "dbconnect.php";
$usr=$_SESSION['usr'];
$access=$_SESSION['access'];
?>
<h4>ΕΠΙΛΟΓΗ ΜΑΘΗΤΗ/ΤΡΙΑΣ</h4>
<?php 
$sql2 = mysqli_query($con,"SELECT DISTINCT tmima FROM allstudentinfo order by tmima ASC");
?>
<form  method='post' action='listkatastudent1.php'>
    <label>Τμήμα:</label><select name='tmimaid' id='tmimaid'>
    <?php
	echo "<option value='---'>select</option>";
    while($row2 = mysqli_fetch_array($sql2) ) 
	{
          echo "<option value='$row2[tmima]'>$row2[tmima]</option>";
    }
    ?>
    </select>
  
    <label> Μαθητής/τρια:</label>
    <select name='nameid' id='nameid' value= ></select>
    <input type="hidden" name="acess" value="<?php echo $access;?>" >

<input type="submit" name="submit1" value="Επιβεβαίωση Επιλογής" >  
</form>
<br /><br />
<a  href=<?php echo $menu;?> style="color:blue "  > <button> Επιστροφή στο Μενού  </a>
</body>
</html>
