<?php require_once('Connections/conn.php'); ?>
<?php
	$programa=$_GET['programa'];
	$numero=$_GET['numero'];
	mysql_select_db($database_conn, $conn);
	mysql_query ("SET NAMES 'utf8'");
 	$sql = "select * from cohortes where programa='$programa' and num_cohorte='$numero'";
 	$rs=mysql_query($sql, $conn);
	$reg=mysql_num_rows($rs);
	if ($reg != 0)
	 {
	 ?>
	 <script type="text/javascript">
	    msj="Cohorte número <?php echo $numero; ?> del programa <?php echo $programa; ?> ya existe."
		alert(msj);
		window.parent.document.form1.programa.focus();
		window.parent.document.form1.programa.value=0;
	 </script>
	 <?php
	 }
?>