<select name="selbrand">
<option value="">All Brand</option>
<?php
$select="car";
if (isset ($select)&&$select!=""){
$select=$_POST ['NEW'];
}
$list=mysql_query("select distinct BrandCategory from cardetail") or die(mysql_error());
while($row_list=mysql_fetch_assoc($list)){
?>
<option value="<?php echo $row_list['BrandCategory']; ?>"<?php if($row_list['BrandCategory']==$select){ echo "selected"; } ?>>
<?php echo $row_list['BrandCategory'];
$abc="selected";
?>
</option>
<?php
}
?>
</select>
No comments:
Post a Comment