dude that was a someple search now I'm makin a multiplt search but only the dropdown is working I donno why?
I'm sending code for first three dropdown list I'm using in my advance search
<td>
<?
$flag=0;
$query = "select * from property";
if($_POST['select'] && $_POST['select']!='Select')
{ $query = $query." where area='".$_POST['select']."'";
$flag=1;
$result = mysql_query($query);
if($result) {
while($row = mysql_fetch_array($result,MYSQL_NUM))
{ $area = $row[8];
$sale = $row[5];
$type = $row[7];
$status = $row [6];
$bed = $row[9];
$ls = $row[10];
$price = $row [11];
if($sale==1){ $sl="For Rental";} else if($sale==2){$sl="For Sale";} else {}
if ($status ==1){ $st="Active";} else if($status==2){ $st="Deposit paid";} else if($status==3){$st="Sold";} else {}
if ($type ==1){ $t="Appartment";} else if($type==2){ $t="Country Home";}else if($type==3){ $t="Plot of Land";}else if($type==4){ $t="Pentthouse";}else if($type==5){ $t="Town House";}else if($type==6){ $t="Studio";}else if($type==7){ $t="Rental";}else if($type==8){ $t="New Development";}else if($type==9){$t="Villa";}else {}
echo "<table width='75%' border='1'>
<tr>
<td>Area</td>
<td>Land Size</td>
<td>Type</td>
<td>Status</td>
<td>Sale</td>
<td>Bedrooms</td>
<td>Price</td>
</tr>
<tr>
<td>$area</td>
<td>$ls</td>
<td>$t</td>
<td>$st</td>
<td>$sl</td>
<td>$bed</td>
<td>$price</td>
</tr>
</table>";}
mysql_free_result($result); }
}
if($POST['select2'] && $POST['select2']!='Select')
{ if($flag==0)
{ $query = $query." where type='".$_POST['select2']."'";
$flag = 1;
$result1 = mysql_query($query);
if($result1)
{
while($row1 = mysql_fetch_array($result1,MYSQL_NUM))
{ $area1 = $row1[8];
$sale1 = $row1[5];
$type1 = $row1[7];
$status1 = $row1[6];
$bed1 = $row1[9];
$ls1 = $row1[10];
$price1 = $row1[11];
if($sale1==1){ $s2="For Rental";} else if($sale1==2){$s2="For Sale";} else {}
if ($status1 ==1){ $st1="Active";} else if($status1==2){ $st1="Deposit paid";} else if($status1==3){$st1="Sold";} else {}
if ($type1 ==1){ $t1="Appartment";} else if($type1==2){ $t1="Country Home";}else if($type1==3){ $t1="Plot of Land";}else if($type1==4){ $t1="Pentthouse";}else if($type1==5){ $t1="Town House";}else if($type1==6){ $t1="Studio";}else if($type1==7){ $t1="Rental";}else if($type1==8){ $t1="New Development";}else if($type1==9){$t1="Villa";}else {}
echo "<table width='75%' border='1'>
<tr>
<td>Area</td>
<td>Land Size</td>
<td>Type</td>
<td>Status</td>
<td>Sale</td>
<td>Bedrooms</td>
<td>Price</td>
</tr>
<tr>
<td>$area1</td>
<td>$ls1</td>
<td>$t1</td>
<td>$st1</td>
<td>$s2</td>
<td>$bed1</td>
<td>$price1</td>
</tr>
</table>";}
mysql_free_result($result1); }
}
else
{ $query = $query." where type='".$_POST['select2']."'";
$result1 = mysql_query($query);
if($result1) {
while($row1 = mysql_fetch_array($result1,MYSQL_NUM))
{ $area1 = $row1[8];
$sale1 = $row1[5];
$type1 = $row1[7];
$status1 = $row1[6];
$bed1 = $row1[9];
$ls1 = $row1[10];
$price1 = $row1[11];
if($sale1==1){ $s2="For Rental";} else if($sale1==2){$s2="For Sale";} else {}
if ($status1 ==1){ $st1="Active";} else if($status1==2){ $st1="Deposit paid";} else if($status1==3){$st1="Sold";} else {}
if ($type1 ==1){ $t1="Appartment";} else if($type1==2){ $t1="Country Home";}else if($type1==3){ $t1="Plot of Land";}else if($type1==4){ $t1="Pentthouse";}else if($type1==5){ $t1="Town House";}else if($type1==6){ $t1="Studio";}else if($type1==7){ $t1="Rental";}else if($type1==8){ $t1="New Development";}else if($type1==9){$t1="Villa";}else {}
echo "<table width='75%' border='1'>
<tr>
<td>Area</td>
<td>Land Size</td>
<td>Type</td>
<td>Status</td>
<td>Sale</td>
<td>Bedrooms</td>
<td>Price</td>
</tr>
<tr>
<td>$area1</td>
<td>$ls1</td>
<td>$t1</td>
<td>$st1</td>
<td>$s2</td>
<td>$bed1</td>
<td>$price1</td>
</tr>
</table>";}
mysql_free_result($result1); }
}
}
if($POST['select3'] && $POST['select3']!='Select')
{ if($flag==0)
{ $query = $query." where bedrooms='".$_POST['select3']."'";
$flag = 1;
$result2 = mysql_query($query);
if($result2)
{
while($row2 = mysql_fetch_array($result2,MYSQL_NUM))
{ $area2 = $row2[8];
$sale2 = $row2[5];
$type2 = $row2[7];
$status2 = $row2[6];
$bed2 = $row2[9];
$ls2 = $row2[10];
$price2 = $row2[11];
if($sale2==1){ $s3="For Rental";} else if($sale2==2){$s2="For Sale";} else {}
if ($status2 ==1){ $st2="Active";} else if($status2==2){ $st2="Deposit paid";} else if($status2==3){$st2="Sold";} else {}
if ($type2 ==1){ $t2="Appartment";} else if($type2==2){ $t2="Country Home";}else if($type2==3){ $t2="Plot of Land";}else if($type2==4){ $t2="Pentthouse";}else if($type2==5){ $t2="Town House";}else if($type2==6){ $t2="Studio";}else if($type2==7){ $t2="Rental";}else if($type2==8){ $t2="New Development";}else if($type2==9){$t2="Villa";}else {}
echo "<table width='75%' border='1'>
<tr>
<td>Area</td>
<td>Land Size</td>
<td>Type</td>
<td>Status</td>
<td>Sale</td>
<td>Bedrooms</td>
<td>Price</td>
</tr>
<tr>
<td>$area2</td>
<td>$ls2</td>
<td>$t2</td>
<td>$st2</td>
<td>$s3</td>
<td>$bed2</td>
<td>$price2</td>
</tr>
</table>";}
mysql_free_result($result2); }
}
else
{ $query = $query." where bedrooms='".$_POST['select3']."'";
$result2 = mysql_query($query);
if($result2)
{
while($row2 = mysql_fetch_array($result2,MYSQL_NUM))
{ $area2 = $row2[8];
$sale2 = $row2[5];
$type2 = $row2[7];
$status2 = $row2[6];
$bed2 = $row2[9];
$ls2 = $row2[10];
$price2 = $row2[11];
if($sale2==1){ $s3="For Rental";} else if($sale2==2){$s2="For Sale";} else {}
if ($status2 ==1){ $st2="Active";} else if($status2==2){ $st2="Deposit paid";} else if($status2==3){$st2="Sold";} else {}
if ($type2 ==1){ $t2="Appartment";} else if($type2==2){ $t2="Country Home";}else if($type2==3){ $t2="Plot of Land";}else if($type2==4){ $t2="Pentthouse";}else if($type2==5){ $t2="Town House";}else if($type2==6){ $t2="Studio";}else if($type2==7){ $t2="Rental";}else if($type2==8){ $t2="New Development";}else if($type2==9){$t2="Villa";}else {}
echo "<table width='75%' border='1'>
<tr>
<td>Area</td>
<td>Land Size</td>
<td>Type</td>
<td>Status</td>
<td>Sale</td>
<td>Bedrooms</td>
<td>Price</td>
</tr>
<tr>
<td>$area2</td>
<td>$ls2</td>
<td>$t2</td>
<td>$st2</td>
<td>$s3</td>
<td>$bed2</td>
<td>$price2</td>
</tr>
</table>";}
mysql_free_result($result2); }
}
}