Hello
im not a pro' but im sure that there is a better way and shorter to get data from my DB according the form (link : Meu-ape)

here is the code :
Code:
//Here we count the number of results 
//Edit $data to be your query 

//category
$category_sql="category='$category' ";

//cidade
$cidade_sql="cidade='$cidade'";

//bairro
$bairro_sql="bairro='$bairro'";

//bairro_Tudo
$bairro_tudo="bairro IN ('Lagoa Nova','Tirol')";

//quartos = Tudo
$quartos_tudo="quartos IN ('1','2','3','4','Kitinet')";

//quartos
$quartos_sql="quartos='$quartos' ";

//preco between
$preco_between="preco_between BETWEEN '$preco1' AND '$preco2'";


// now the SQL
if($quartos=="Tudo"&&$bairro=="Tudo"&&$preco1==""&&$preco2=="")
{
$data = mysql_query("SELECT  * FROM _Form_Nr_2 WHERE  $category_sql AND $cidade_sql AND $bairro_tudo AND $quartos_tudo") or die(mysql_error());
}
elseif($quartos=="Tudo"&&$bairro=="Tudo")
{
$data = mysql_query("SELECT  * FROM _Form_Nr_2 WHERE  $category_sql AND $cidade_sql AND $bairro_tudo AND  $preco_between AND $quartos_tudo") or die(mysql_error());
}
elseif($bairro=="Tudo")
{
$data = mysql_query("SELECT  * FROM _Form_Nr_2 WHERE  $category_sql AND $cidade_sql AND $bairro_tudo AND  $preco_between AND $quartos_sql") or die(mysql_error());
}
elseif($quartos=="Tudo")
{
$data = mysql_query("SELECT  * FROM _Form_Nr_2 WHERE  $category_sql AND $cidade_sql AND $bairro_sql AND  $preco_between AND $quartos_tudo") or die(mysql_error());
}
else
$data = mysql_query("SELECT  * FROM _Form_Nr_2 WHERE  $category_sql AND $cidade_sql") or die(mysql_error());

	

		while($row = mysql_fetch_array($data))
		{	
// beginning of row//
echo '<tr style=" border-bottom: 1px solid #fff;" onmouseover="mover(this);" onmouseout="mout(this);">';

... and so on...

thanks