<?php include("../db_connection.php");?>

	

    

    <select name="desire_cat[]"  class="form-control category1 more1" required="">

        <option value="">Select Category</option>

      <?php

       $sql=mysql_query("select * from tbl_category where mcid='".$_POST['val']."' and status='Enable' order by name asc");

		while($res=mysql_fetch_assoc($sql))

		{

        ?>

        

        <option  value="<?php echo $res['cid'];?>"><?php echo $res['name'];?></option>

        <?php  }?>

    </select>

    

    

    <script>

	$(".nearcat").on('change','.category1',function(){

	

	var val=$(this).val();

	



	var len=$(".desprod").length;

	

	var sm=val.concat(len); 

	

	$(this).parent().siblings('.nearsubcat').addClass('subcat_'+sm);

	

	

	

	$.post("<?php echo $actual_link;?>ajax/desiresubcat.php",{val:val,len:$(".desprod").length},function(data){

	

		$('.subcat_'+sm).html(data);

		

	});



});

	</script>

   

	