<?php
	//connection
	include("connection.php");
    include("frames_header.php");
?>

<h2><strong><em>Delete competence.</em></strong> </h2><br>
<center>
<form action="competence-delete3.php" method="post" name="formu" target="_blank">

<?php

	$dev="";
    if(isset($_POST["devstage"]))
		$dev = $_POST["devstage"];
	
	
	if( strlen($dev)<=0 ){
	    print "<center><h2></h2><br>Please select a developmental stage</center>";
		include("frames_footer.php");
	    return;
	}
    
	
	print '<table border="1" cellspacing="0" cellpadding="0" width="99%">';
	print '<tr align="center"><td>&nbsp;</td><td>Cell</td><td>Competence</td></tr>';

	$requete= "SELECT \"NAME\", \"CELL\", \"COMPETENCE\" FROM \"COMPETENCE\" , \"ANAT_ENTITY\" WHERE \"DEV_STAGE_ID\"=$dev and \"CELL\"=\"ANAT_ID\"";
	$stmt = pg_query($c,$requete) or die("<strong>Error</strong> ".pg_last_error($c));
    $count=0;
	while($row=pg_fetch_array($stmt)){
        ++$count;
		
        print '<tr><td width="10"><input type="checkbox" name="ind[]" value="'.    $row["CELL"]."--".$row["COMPETENCE"]  .'"></td><td>'.$row["NAME"].'</td><td>'.$row["COMPETENCE"].'</td></tr>';
		
	}
	
	print '</table><br><br>';
	if($count==0)
	    print '<strong>No match</strong>';
	else
        print '<input name="submit" type="image" src="pictures/button-submit.jpg" onClick="submit">';
?>
</form>
</center>



<?php
    include("frames_footer.php");
?>