<?php
include('../includes/con2pma3.php');
	include('../includes/checkSession.php');
	$id = $_SESSION['id'];

	$q=$_GET["q"];
	$p = $_GET["p"];
	//include('../includes/con2db.php');

?>
 <option value="0">Select</option>
        <?php 
		
        $result21 = mysql_query("SELECT * FROM globalitems where companyID = '$id' && itemParent = '0' && WBSID = '$q' ORDER BY itemID ASC");
		
   		while($row = mysql_fetch_array($result21 , MYSQL_ASSOC))
  		{
			$d = $row['description'];
			$i = $row['itemID'];
			
			if( $i == $p)
     	echo " <option selected='selected' value='$i'> $d </option>";
      	else
	  	echo " <option value='$i'> $d </option>";
     
		}
  		?>