<?php session_start();?>
<?php include("header.php"); ?>
<?php include("open_connection.php"); ?>
<p><br>
		
		<?php 
		
		if($_SESSION['vendor_category'] == 'vendor_category')
					{
					   echo "<script language='javascript'>window.location='vendor_categorySearch.php?vendor_category=$vendor_category'</script>";
					}
					
					
					?>
<form method="post" action="vendor_categorySearch.php">
<table width="99%" height="166"> 
  <tr>
	
	<td width="24%"><a href="vendor_admin.php"><img src="images/img-Vendor.jpg" alt="vendor" width="200" height="150" border="0"></a></td>
   
	<td width="24%"><font color="#000000" ><font color="#FF0000">**Search vendor by category.</font> <br>
Vendor Category </font><br>
	  <select name="vendor_category"  class="input-xlarge">
        <option selected="selected">--Please Select-- </option>
        <?php
				            $Category_query=mysql_query("select category_name from tbl_ref_category where category_name LIKE '%".$_POST[vendor_category]. 			                            "%' ORDER BY category_name")or die(mysql_error());
                                while($row=mysql_fetch_array($Category_query)){
                            ?>
        <option>
        <?php
                                     echo $row['category_name'];
									
                                 ?>
        </option>
        <?php
                                }
                            ?>
							
      </select>
    <input name="submit" type="submit" class="myButton"  value="SEARCH" /> </td>
  
    </form>
 
 	<?php if($_SESSION['vendor_section'] == 'vendor_section')
					{
					   echo "<script language='javascript'>window.location='vendor_sectionSearch.php?vendor_section=$vendor_section'</script>";
					}
					?>
		<form method="post" action="vendor_sectionSearch.php">
		 	<td width="24%"><font color="#000000" ><font color="#FF0000">**Search vendor by section.</font> <br>
			Vendor Section </font><br>
				<select name="vendor_section"  class="input-xlarge">
  				<option selected="selected">--Please Select-- </option>
 				 <?php
				            $section_query=mysql_query("select section_name from tbl_ref_section where section_name LIKE '%".$_POST[vendor_section]. 			                            "%' ORDER BY section_id")or die(mysql_error());
                                while($row=mysql_fetch_array($section_query)){
                            ?>
  				<option>
 				 <?php
                                     echo $row['section_name'];
									
                                 ?>
  				</option>
 				 <?php
                                }
                            ?>
				</select>
				<input name="submit" type="submit" class="myButton"  value="SEARCH" /> </td>
	
	</form>
	</tr>
  </table>
  
  

	 </p>
<?php include("footer.php"); ?>