<?php  $PageSecurity = 11; error_reporting(0);
  include('includes/SQL_CommonFunctions.inc');
 include('includes/function_lib.php');
 include('includes/session.inc');
 global $db;
 		   	$q=$_GET['q'];
     
        $query=DB_query("select * from crm_picklist where parent_id='".$q."'",$db);
   ?>
   <select name="mst_pl_subcatid" style="width:180">
   <option value="0">---</option>
 		<?php 
 		  while($row=DB_fetch_array($query))
		  {
		  $k='';
		  if($categoryid==$row['id'])
		  {
		  $k="selected";	
		  }
 		  
		 ?>
		<option value="<?php echo $row['picklist_id'] ?>"<?php echo $k; ?> ><?php echo 	 $row['picklist_title'] ?></option>
		<?php } ?>
		</select>
   