if ($price1=='')
$sql="SELECT * FROM car WHERE price";
else{
$sql="SELECT * FROM car WHERE price between '$price1' and '$price2' ";
//$sql="SELECT * FROM car WHERE 'price< $price1' and 'price< $price2' ";
}
echo $sql;
if ($price1=='')
$sql="SELECT * FROM car WHERE price";
else{
//$sql="SELECT * FROM car WHERE price between '$price1' and '$price2' ";
$sql="SELECT * FROM car WHERE 'price > $price1' and 'price < $price2' ";
}
echo $sql;
if ($price1=='')
$sql="SELECT * FROM car WHERE price";
else{
$sql="SELECT * FROM car WHERE price between '$price1' and '$price2' ";
//$sql="SELECT * FROM car WHERE price > '$price1' and price< '$price2' ";
}
echo $sql;