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

<?php
    $name=$_GET["name"];
	
	$requete="select A.*, B.\"SPECIES\" from \"CONSTRUCTION\" A, \"MOL_ENTITY\" B where (A.\"NAME\"='$name')and(A.\"CONSTRUCTION_ID\"=B.\"MOL_ID\")";
	$stmt = pg_query($c,$requete);
	if($row=pg_fetch_array($stmt)){
	    $species=$row["SPECIES"];
	    $id=$row["CONSTRUCTION_ID"];
		
		print '<META HTTP-EQUIV="Refresh" CONTENT="0; URL=construct-edit.php?constructid='.$id.'">';
		
	}else{
		print "<br><br><center><h2><strong>No match</strong></h2></center><br><br>";
	}

?>

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