<?php
include("../include/session.php");
    
	$query = "SELECT vehicleId, reg_no FROM nam_vehicle WHERE reg_no = '". $_SESSION['fleet_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=34&s=";
     </script>
 <?php
	} 
	else { 
	 $vehicleId = mysql_result($result, 0, "vehicleId"); 
		?>
        <script language="javascript" type="text/javascript">
		
             window.location="editVehicle.php?vehicleId=<?php echo $vehicleId ?>&edit=0";
     </script>
	<?php
	}
	?>