<?php
include('config/koneksi2.php');
$tipe=$_GET['tipe'];
$brand=$_GET['brand'];

if($tipe =="" and $brand !="")
{
$kota = mysql_query("SELECT distinct kategori FROM bs_stok WHERE  brand='$brand'");
}
else if($tipe !="" && $brand =="")
{
$kota = mysql_query("SELECT distinct kategori FROM bs_stok WHERE tipe='$tipe'");
}
else if($tipe !="" && $brand !="")
{
$kota = mysql_query("SELECT distinct kategori FROM bs_stok WHERE tipe='$tipe' and brand='$brand'");
}
else
{
$kota = mysql_query("SELECT distinct kategori FROM bs_stok ");

}
echo"<option value=\"\" selected>ALL KATEGORI</option>";
while($k = mysql_fetch_array($kota)){
    echo "<option value=\"".$k['kategori']."\">".$k['kategori']."</option>\n";
}
/*	exit;
}*/
?>
