<?php
include("../include/session.php");
    
	$query = "SELECT CustNo, CompanyName FROM customer WHERE CompanyName = '". $_SESSION['cust_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=30&s=";
     </script>
 <?php
	} 
	else { 
	 $cust_no = mysql_result($result, 0, "CustNo");
		?>
        <script language="javascript" type="text/javascript">
             window.location="editCustomer.php?CustNo=<?php echo $cust_no ?>&edit=0";
     </script>
	<?php
	}
	?>