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

<html>
<body bgcolor="#871F1F" text="#FFFFFF" link="#000000" vlink="#000000" alink="#000000">
<title>ANISEED</title>
<center>
<?php
	
	$ind=array();
    if(isset($_POST["ind"])){
		$ind = $_POST["ind"];
		
		
		for($h=0;$h<count($ind);++$h){
			//list($icell,$cell,$dfate,$ifate,$mol,$comment) = split ("--", $ind[$h]);
			$indid=$ind[$h];
			
	pg_query($c,"begin");

			$requete="delete from \"INDUCTION_MOL\" where \"INDUCTION_ID\"=$indid";
			$stmt3 = pg_query($c,$requete) or die("<strong>Error</strong> ".pg_last_error($c));
			
			
			$requete="delete from \"INDUCTION_FATE\" where \"INDUCTION_ID\"=$indid";
			$stmt3 = pg_query($c,$requete) or die("<strong>Error</strong> ".pg_last_error($c));
			
			$requete="delete from \"INDUCTION\" where \"INDUCTION_ID\"=$indid";
			$stmt3 = pg_query($c,$requete) or die("<strong>Error</strong> ".pg_last_error($c));
			
			$requete="delete from \"REFERENCE\" where \"BIO_ID\"=$indid";
			$stmt3 = pg_query($c,$requete) or die("<strong>Error</strong> ".pg_last_error($c));
			
			
			$requete="delete from \"BIO_ENTITY\" where \"BIO_ID\"=$indid";
			$stmt3 = pg_query($c,$requete) or die("<strong>Error</strong> ".pg_last_error($c));
			
			
		}
	pg_query($c,"commit");

	    print "Data successfully removed";
	}else{
	    print "ERROR: no line selected";
	}
	
?>
<br><br><br>
<input type="button" name="OK" onClick="javascript: self.close();" value=" OK ">
</center>
</body>
</html>