<div class="graph-visual tables-main">
<h2 class="inner-tittle"> Exam Card  </h2>
<div class="graph-form">
    <div class="form-body">
	<form action="?page=getcard&i=1">
	
	 <label for="MerchantTransactionID">Centre</label>
	 <input type="hidden" name="page" value="getcard">
	 <select name="myexam" required="required" class="form-control" style="height:auto" >
	  <option>GDE</option>
	  <option>TPC</option>
	 </select>
	 
	 <br>
	 
	 <select name="centre" required="required" class="form-control" style="height:auto" >
	  <?php
	   
	   $q = "SELECT DISTINCT centre from examcard";
	   $r = mysqli_query($con, $q);


		if($r){
		 while($rows = mysqli_fetch_array($r))
		 {
		   extract($rows);
		   echo "<option>$centre</option>";
		 }
		}
	  ?>
	 </select>
	 
	 <br>
	 
	 <select name="diet" required="required" class="form-control" style="height:auto" >
	  <?php
	  	echo "<option>MAY, ".date('Y')."</option>";
		echo "<option>SEPTEMBER, ".date('Y')."</option>";
	   /*
	   $q = "SELECT DISTINCT diet from examcard";
	   $r = mysqli_query($con, $q);


		if($r){
		 while($rows = mysqli_fetch_array($r))
		 {
		   extract($rows);
		   echo "<option>$diet</option>";
		 }
		}
		*/
	  ?>
	 </select>
	 <br>
	 
    </div>
      <input type="hidden" name="i" value="1" />
      <input name="verify" type="submit" class="btn btn-default" value="OK"/> 
     
	</form>
	
	<?php 
	if(isset($_GET["centre"]))
	  
	{
	 extract($_GET);
	 echo "<a href='https://register.niqs.org.ng/admin/examcard.php?&i=1&diet=".$diet."&centre=".$centre."&myexam=".$myexam."' target='_blank'>Generate Card</a>";
	}
	
	?>
    		
</div>


</div>