<?php require_once('Connections/conn.php'); ?>
<?php
	$codigo=$_GET['codigo'];
	mysql_select_db($database_conn, $conn);
	mysql_query ("SET NAMES 'utf8'");
	$sql = "select * from carreras where id_carrera='$codigo'";
	$rs=mysql_query($sql, $conn);
	$reg=mysql_num_rows($rs);
	if ($reg != 0)
	 {
	 ?>
	 <script type="text/javascript">
	    msj="Programa Código "+'<<<?php echo $codigo; ?>>>' +" ya existe"
	 	alert(msj);
		window.parent.document.addCarrera.id_carrera.focus();
		window.parent.document.addCarrera.id_carrera.value="";
	 </script>
	 <?php
	 }
?>