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



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


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


pg_query($c,"begin");
for ($i=0;$i<count($region);$i++)
{

$requete="INSERT INTO \"ARTICLE_ANATOMY\" (\"ARTICLE_ID\",\"ANAT_ID\",\"TRANSCRIPT\") values ('$id','".$region[$i]."','$gene')";
pg_query($c,$requete) or die (pg_last_error($c));
}

pg_query($c,"commit");


print "<center><h3>Territories affected Added</h3></center>";




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