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



$fate=$_POST["fate"];
$id=$_POST["id"];
$gene=$_POST["gene"];

if (strlen($fate)==0) 
	{
	print "<br><center>Choose at least one fate !</center>";
	include ("frames_footer.php");
	return;
	}

if (strlen($gene)==0)
	{
	print "<br><center>Choose at least one transcript ID !</center>";
	include ("frames_footer.php");
	return;
	}


pg_query($c,"begin");
for ($i=0;$i<count($fate);$i++)
{
$requete="INSERT INTO \"ARTICLE_FATE\" (\"ARTICLE_ID\",\"FATE\",\"TRANSCRIPT\") values ('$id','".$fate[$i]."','$gene')";
pg_query($c,$requete) or die(pg_last_error($c));
}
pg_query($c,"commit");






include ("frames_footer.php");
?>

<SCRIPT LANGUAGE="JavaScript"> javascript:opener.location.reload(); self.close(); </script>
