<?
include("../include/config.php");
$str=$_REQUEST['str'];
$div=$_REQUEST['divk'];
$k=$_REQUEST['k'];
$drp_value='';
if(isset($_REQUEST['drp_value'])){
	$drp_value=stripslashes($_REQUEST['drp_value']);
	$drp_value=substr($drp_value,0,-1);
}
$sql= "select tyre_no from tbl_tyre_details  where type='".$str."' and (status!=1 or status!=2) ";
if($drp_value!=''){
 $sql= "select tyre_no from tbl_tyre_details  where type='".$str."' and tyre_no NOT IN (".$drp_value.") and (status!=1 or status!=2) ";
}
$qry=mysql_query($sql);
?>
Tyre Number <select name="tyrenum<?=$div?><?=$k?>" onchange="write_val(this.value)">
<option value="">--Select--</option>
<? while($obj=mysql_fetch_object($qry)){?>
		<option value="<?=$obj->tyre_no?>"><?=$obj->tyre_no?></option>
		<? }?>
		
          </select>