<?php
include("../include/session.php");
    
	$query = "SELECT repId, last_name FROM nam_rad_representatives WHERE last_name = '". $_SESSION['rep_name']."'" ;
	$result = mySQL_query($query) or die ("Error in query:   $Query . * ". mySQL_error());
	$num = mysql_num_rows($result);
	
	if ($num==0) { 
	?>
    <script language="javascript" type="text/javascript">
           window.location="editWizbase.php?p=33&s=";
     </script>
 <?php
	} 
	else { 
	 $repId = mysql_result($result, 0, "repId"); 
		?>
        <script language="javascript" type="text/javascript">
		
             window.location="editRep.php?repId=<?php echo $repId ?>&edit=0";
     </script>
	<?php
	}
	?>