tudo.php <? mysql_connect("localhost","root","") or die("Não foi possível a conexão.".mysql_error()); mysql_select_db("tudo"); $quero = $_POST["quero"]; $imovel = $_POST["imovel"]; $usado = $_POST["usado"]; $tipo = $_POST["tipo"]; $min = $_POST["min"]; $max = $_POST["max"]; $opcional = $_POST["opcional"]; $com =$_POST["com"]; $sendo = $_POST["sendo"]; $e = $_POST["e"]; $entre = $_POST["entre"]; $ee = $_POST["ee"]; $rs = mysql_query("select * from consulta where * like '%$quero%'"); echo "<center>"; echo "</font></p><font face='Verdana'><b>"; echo "Foi(ram) encontrado(s) <font color='#0000ff'>".mysql_affected_rows()."</font> resultado(s) de sua consulta.</p>"; echo "</b></font>"; echo "<table border='10' cellspacing='0' bordercolor='#0000ff'>"; while($reg = mysql_fetch_array($rs)) { echo "<tr bgcolor='#cccccc'><td><font face='Verdana'><b> </b></font></td> <td><font face='Verdana' color='#cc0000'><b> $reg[3] </b></font></td></tr>"; echo "<tr bgcolor='#cccccc'><td><font face='Verdana'><b> </b></font></td> <td><font face='Verdana' color='#cc0000'><b> $reg[4] </b></font></td></tr>"; echo "<tr bgcolor='#cccccc'><td><font face='Verdana'><b> </b></font></td> <td><font face='Verdana' color='#cc0000'><b> $reg[5] </b></font></td></tr>"; echo "<tr bgcolor='#cccccc'><td><font face='Verdana'><b> </b></font></td> <td><font face='Verdana' color='#cc0000'><b> $reg[6] </b></font></td></tr>"; echo "<tr bgcolor='#cccccc'><td><font face='Verdana'><b> </b></font></td> <td><font face='Verdana' color='#cc0000'><b> $reg[7] </b></font></td></tr>"; echo "<tr bgcolor='#cccccc'><td><font face='Verdana'><b> </b></font></td> <td><font face='Verdana' color='#cc0000'><b> $reg[8] </b></font></td></tr>"; echo "<tr bgcolor='#cccccc'><td><font face='Verdana'><b> /b></font></td> <td><font face='Verdana' color='#cc0000'><b> $reg[9] </b></font></td></tr>"; echo "<tr bgcolor='#cccccc'><td><font face='Verdana'><b> </b></font></td> <td><font face='Verdana' color='#cc0000'><b> $reg[10] </b></font></td></tr>"; echo "<tr bgcolor='#cccccc'><td><font face='Verdana'><b> </b> </font></td> <td><font face='Verdana' color='#cc0000'><b> $reg[11] </b></font></td></tr>"; echo "<tr bgcolor='#cccccc'><td><font face='Verdana'><b> </b></font></td> <td><font face='Verdana' color='#cc0000'><b> $reg[12] </b></font></td></tr>"; echo "<tr bgcolor='#cccccc'><td><font face='Verdana'><b> </b></font></td> <td><font face='Verdana' color='#cc0000'><b> $reg[13] </b></font></td></tr>"; echo "<tr bgcolor='#0000ff'><td colspan='3'> </td></tr>"; } echo "</table>"; echo "</center>"; echo "</font></p><font face='Verdana'>"; echo "<b>Clique <a href='index.php'>aqui</a> para voltar.</b>"; echo "</font>"; mysql_close(); ?> [/codebox] este esta dando erro na linha 11 quano não seleciono a opçao mais ateh ai tudo bem..na linha 26 esta dando erro mais não consigo arrumar..não entendo o que é...e preciso mostra tudo so q não ta aparecendo...na hr q clico em consultar não sei porque ele não quer bscar do bd..eu tentei colokar todas as variaves, em uma variavel $tudo ond o $rs iria motrar todas..so q também não ta indo !! index.php [codebox] <html> <head><title>Busca</title></head> <body> <form action="tudo.php" method="post"> <h1>Busca Detalhada</h1> <font face="System" size="4"> <table border="0"> <th width="4"><p> <td width="59">Eu Quero</td> <td width="88"><select name="quero"> <option selected>Comprar</option> <option >Alugar</option> </select></td><td width="0"></p><td width="0"></th> <th width="4"><p><td width="41">Imovel</td> <td width="113"><select name="imovel"> <option selected>Residencial</option> <option >Comercial</option> </select></td><td width="0"></p><td width="0"></th> <th width="4"><p><td width="20"></td> <td width="129"><select name="usado"> <option selected>Em Lançamento</option> <option >Usado</option> </select></td><td width="0"></p><td width="0"></th> <th width="4"><p><td width="30">Tipo</td> <td width="117"><select name="tipo"> <option selected>Casa</option> <option >Apartamento</option> <option >Galpão</option> <option >Cobertura</option> <option >Terreno</option> </select></td><td width="0"></p><td width="0"></th> <th width="4"><p><td width="34">Área min.</td> <td width="91"><select name="min"> <option selected>15</option> <option >15</option> <option ></option> <option ></option> <option ></option> </select></td><td width="0"></p><td width="0"></th> <th width="4"><p><td width="34">Área max.</td> <td width="94"><select name="max"> <option selected>20<option> <option >20</option> <option ></option> <option ></option> <option ></option> </select></td><td width="0"></p><td width="0"></th> </table> <table border="0"> <th><br><br><br><SELECT NAME="opcional" MULTIPLE SIZE="5"> <OPTION>Televisão <OPTION>Cama de Casal <OPTION>Ar Condicionado <OPTION>Fax <OPTION>Modem V.34 <OPTION>Sauna <OPTION>Lavanderia <OPTION>Frigo-Bar </SELECT></br></br></br></th> <th><p><td width="32">Com</td> <td width="121"><select name="com"> <option selected>Dormitórios Indiferente</option> <option >1 Dormitório</option> <option >2 Dormitórios</option> <option >3 Dormitórios</option> <option >4 Dormitórios</option> <option >5 Dormitórios</option> <option >6 Dormitórios</option> <option >Mais de 6 Dormitórios</option> </select></td></p></th> <th><p><td width="32">Sendo</td> <td width="121"><select name="sendo"> <option selected>Suites Indiferente</option> <option >1 Suite</option> <option >2 Suites</option> <option >3 Suites</option> <option >4 Suites</option> <option >5 Suites</option> <option >6 Suites</option> <option >Mais de 6 Suites</option> </select></td></p></th> <th><p><td width="32">e</td> <td width="121"><select name="e">. <option selected>Vagas Indiferente</option> <option >1 Vaga</option> <option >2 Vagas</option> <option >3 Vagas</option> <option >4 Vagas</option> <option >5 Vagas</option> <option >6 Vagas</option> <option >Mais de 6 Vagas</option> </select></td></p></th> </table> <table border="0"> <p><td width="121">Valor entre</td> <td width="121"><select name="entre">. <option selected>Valor Minímo</option> <option >2550</option> <option >25550</option> <option >23556</option> <option >96585</option> <option >9125541</option> <option >100000000</option> <option >3125010100</option> </select></td></p> <th><p><td width="31">e</td> <td width="121"><select name="ee">. <option selected>Valor Maxímo</option> <option >2550</option> <option >25550</option> <option >23556</option> <option >96585</option> <option >9125541</option> <option >100000000</option> <option >3125010100</option> </select></td></p><th> <input type="submit" value="Buscar "><hr> </th></th></table></html> este aki é a interface...em html !! ajudem !! mysql...tabela !! DROP TABLE IF EXISTS `consulta`;
CREATE TABLE `consulta` (
`cod` smallint(6) NOT NULL auto_increment,
`img` varchar(7) NOT NULL default '',
`quero` varchar(30) NOT NULL default '',
`imovel` varchar(30) NOT NULL default '',
`usado` varchar(30) NOT NULL default '',
`tipo` varchar(30) NOT NULL default '',
`min` double NOT NULL default '0',
`max` double NOT NULL default '0',
`opcional` varchar(30) NOT NULL default '',
`com` varchar(30) NOT NULL default '',
`sendo` varchar(30) NOT NULL default '',
`e` varchar(30) NOT NULL default '',
`entre` varchar(30) NOT NULL default '',
`ee` varchar(30) NOT NULL default '',
PRIMARY KEY (`cod`),
KEY `quero` (`quero`)
) TYPE=MyISAM AUTO_INCREMENT=2 ;