Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 07-23-2006, 03:09 PM Search
Super Talker

Posts: 128
Name: Jose daSilva
Trades: 0
Hi

I would like to replace the existent quick search on my website (qs) by the one I have made (qs1) but dos not work.

How can I do it?

Thanks
Attached Images
File Type: jpg qs.jpg (2.1 KB, 4 views)
File Type: jpg qs1.jpg (2.2 KB, 3 views)
josil is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-23-2006, 06:22 PM Re: Search
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
We're going to need more information before we can help.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 07-23-2006, 07:29 PM Re: Search
Super Talker

Posts: 128
Name: Jose daSilva
Trades: 0
OK

Here it his the php search program that I use. Sorry but the variables $ are in portuguese.

<html>

<body>


<? include("header0.inc.php"); ?>
<? include("topmain.inc"); ?>
<?
$ltipo=$lab_tipo["$tipo"];
if ($ord!="" and $ord2!=""){
print ("
<table border='0' width='635' cellspacing='0' cellpadding='0'>
<tr>
<td width='100%'><font face='verdana' size='1'>$lab_resultpesquisa : <b><font color='#06000'>$ltipo</font></b>&nbsp;
<font color='#000000'><b>$search</b></font></font></td>
</tr>
</table>


<table border='0' width='635' bgcolor='#f0f0f0' cellspacing='1' cellpadding='0'>

<tr>

<td width='16%' bgcolor='#d0d0d0'>

<table border='0' width='100%' cellspacing='0' cellpadding='0'>

<tr>

<td width='33%' align='center'><a href='search.php?idioma=$idioma&ord=imagem&ord2=as c&tipo=$tipo&search=$search'><img border='0' src='images/up.gif' width='14' height='15'></a></td>

<td width='33%' align='center'><font face='Arial' size='1' color='#FFFFFF'>$lab_ordenar</font></td>

<td width='34%' align='center'><a href='search.php?idioma=$idioma&ord=imagem&ord2=de sc&tipo=$tipo&search=$search'><img border='0' src='images/down.gif' width='14' height='15'></a></td>

</tr>

</table>

</td>

<td width='8%' bgcolor='#d0d0d0'>

<table border='0' width='100%' cellspacing='0' cellpadding='0'>

<tr>

<td width='33%' align='center' colspan=2>&nbsp;</td>

</tr>

</table>

</td>

<td width='9%' bgcolor='#d0d0d0'>

<table border='0' width='100%' cellspacing='0' cellpadding='0'>

<tr>

<td width='33%' align='center'><a href='search.php?idioma=$idioma&ord=tipologia&ord2 =asc&tipo=$tipo&search=$search'><img border='0' src='images/up.gif' width='14' height='15'></a></td>

<td width='33%' align='center'><font face='Arial' size='1' color='#FFFFFF'>$lab_ordenar</font></td>

<td width='34%' align='center'><a href='search.php?idioma=$idioma&ord=tipologia&ord2 =desc&tipo=$tipo&search=$search'><img border='0' src='images/down.gif' width='14' height='15'></a></td>

</tr>

</table>

</td>

<td width='27%' bgcolor='#d0d0d0'>

<table border='0' width='100%' cellspacing='0' cellpadding='0'>

<tr>

<td width='33%' align='center'><a href='search.php?idioma=$idioma&ord=localidade&ord 2=asc&tipo=$tipo&search=$search'><img border='0' src='images/up.gif' width='14' height='15'></a></td>

<td width='33%' align='center'><font face='Arial' size='1' color='#FFFFFF'>$lab_ordenar</font></td>

<td width='34%' align='center'><a href='search.php?idioma=$idioma&ord=localidade&ord 2=desc&tipo=$tipo&search=$search'><img border='0' src='images/down.gif' width='14' height='15'></a></td>

</tr>

</table>

</td>

<td width='25%' bgcolor='#d0d0d0'>

<table border='0' width='100%' cellspacing='0' cellpadding='0'>

<tr>

<td width='33%' align='center'><a href='search.php?idioma=$idioma&ord=concelho&ord2= asc&tipo=$tipo&search=$search'><img border='0' src='images/up.gif' width='14' height='15'></a></td>

<td width='33%' align='center'><font face='Arial' size='1' color='#FFFFFF'>$lab_ordenar</font></td>

<td width='34%' align='center'><a href='search.php?idioma=$idioma&ord=concelho&ord2= desc&tipo=$tipo&search=$search'><img border='0' src='images/down.gif' width='14' height='15'></a></td>

</tr>

</table>

</td>

<td width='15%' bgcolor='#d0d0d0'>

<table border='0' width='100%' cellspacing='0' cellpadding='0'>

<tr>

<td width='33%' align='center'><a href='search.php?idioma=$idioma&ord=preco&ord2=asc &tipo=$tipo&search=$search'><img border='0' src='images/up.gif' width='14' height='15'></a></td>

<td width='33%' align='center'><font face='Arial' size='1' color='#FFFFFF'>$lab_ordenar</font></td>

<td width='34%' align='center'><a href='search.php?idioma=$idioma&ord=preco&ord2=des c&tipo=$tipo&search=$search'><img border='0' src='images/down.gif' width='14' height='15'></a></td>

</tr>

</table>

</td>

</tr>

<tr>

<td width='16%'>

<p align='center'>&nbsp;</td>

<td width='8%'>

<p align='center'><font face='Verdana' size='2'>$lab_referencia</font></td>

<td width='9%'>");


if ($tipo=="Vivenda" or $tipo=="Apartamento" or $tipo=="Casa" or $tipo=="Quinta") echo "<p align='center'><font face='Verdana' size='2'>$lab_tipoimovelquartos</font></td>";
else echo "<p align='center'><font face='Verdana' size='2'>$lab_tipoimovel</font></td>";

print("
<td width='27%'>

<p align='center'><font face='Verdana' size='2'>$lab_localidade</font></td>

<td width='25%'>

<p align='center'><font face='Verdana' size='2'>$lab_concelho</font></td>

<td width='15%'>

<p align='center'><font face='Verdana' size='2'>$lab_preco</font></td>

</tr>");
include ("chamada.inc.php");

$basedados="global";
if ($tipo) $sql="select * from carteira where situacao=1 and tipo='$tipo'";
if (!$tipo) $sql="select * from carteira where situacao=1 ";
$order="order by $ord $ord2";

$zonas_variaveis="search=$search&idioma=$idioma&or d=$ord&ord2=$ord2&tipo=$tipo";
$campos_search="concelho referencia localidade tipologia descricaopt descricaouk";
$reg_pagina=28;
include("paginacao1.inc");

if ($reg_total>0){

if ($pag_total>1){ print ("
<tr>
<td width=\"100%\" bgcolor=\"#C0C0C0\" align=\"center\" colspan=\"6\">");
include("paginacao2.inc");
print ("</td></tr>");
}

while ($registo=mysql_fetch_array($resultado)) {
$id=$registo["id"];
$imagem=$registo["imagem"];
$tipologia=$registo["tipologia"];
$referencia=$registo["referencia"];
$localidade=$registo["localidade"];
$sector=$registo["sector"];
$preco=$registo["preco"];
$concelho=$registo["concelho"];

if ($idioma=="uk") $licenca=$registo["licencauk"];
else $licenca=$registo["licenca"];

$preco=number_format($preco,2,",",".");
$vendido=$registo["vendido"];

$tipologia=$lab_tipologia["$tipologia"];

$chama="ver_imo";


if ($vendido==0){
if ($imagem==1){
$foto="<a href='ver_imo.php?idioma=$idioma&id=$id'><IMG border='0' SRC='admin/get_miniatura.php?img=2&cliente=$id&max_width=60'> ";
}else{
$foto="<font face='Verdana' size='4'><a href='ver_imo.php?idioma=$idioma&id=$id'><img border='0' src='images/lupa.gif' width='23' height='27' alt='See offer'></a></font>";
}
}
if ($vendido==1){
$foto="<font face='Verdana' size='4'><a href='ver_imo.php?idioma=$idioma&id=$id'><img border='0' src='imagens/res.gif' width='60' alt='Ver Pedido'></a></font>";
}
if ($vendido==2){
$foto="<font face='Verdana' size='4'><a href='ver_imo.php?idioma=$idioma&id=$id'><img border='0' src='imagens/sold.gif' width='60' alt='Ver Pedido'></a></font>";
}


$tot=$tot+1;

print ("

<tr>

<td width='16%' height='40' bgcolor='#FFFFFF'><p align='center'>$foto</td>

<td width='8%' bgcolor='#FFFFFF'><p align='center'><font size='1' face='Arial'>$referencia</font></td>

<td width='9%' bgcolor='#FFFFFF'><p align='center'><font size='1' face='Arial'>$tipologia<br>$licenca</font></td>

<td width='27%' bgcolor='#FFFFFF'><p align='center'><font face='Verdana' size='1'>$localidade $sector</font></td>

<td width='25%' bgcolor='#FFFFFF'><p align='center'><font face='Verdana' size='1'>$concelho</font></td>

<td width='15%' bgcolor='#FFFFFF'><p align='right'><font face='Verdana' size='1'>$preco <font color='#FF0000'>€</font></font></td>

</tr>");

}

if ($pag_total>1){ print ("
<tr>
<td width=\"100%\" bgcolor=\"#C0C0C0\" align=\"center\" colspan=\"6\">");
include("paginacao2.inc");
print ("</td></tr>");
}
}
}
print ("</table>");

include("footer.inc.php"); ?>




</body>
</html>


For example the "lab_preco" is the variable that translates the word price into any language that I select.


Now here it is the search script that I want to modify:

<form method="POST" action="<? echo "search.php?idioma=$idioma&ord=id&ord2=desc" ?>"

<font face="Verdana" size="1">

</font><select size="1" name="tipo">

<option value='Vivenda'selected><? echo $lab_vivendas ?></option>

<option value='Apartamento'><? echo $lab_apartamentos ?></option>

<option value='Casa'><? echo $lab_casastipicas ?></option>

<option value='Quinta'><? echo $lab_quintas ?></option>

<option value='Ruina'><? echo $lab_ruinas ?></option>

<option value='Terreno'><? echo $lab_terrenos ?></option>

<option value='Comercio'><? echo $lab_comercios ?></option>

<option value='Investimento'><? echo $lab_investimentos ?></option>

<option value='Investimento'><? echo $lab_propriedades ?></option>

</select>&nbsp;&nbsp;<input type="text" name="search" size="15">

<input type="submit" value="Go" name="B1" ></form></td>




I hopte that can help

Thanks
josil is offline
Reply With Quote
View Public Profile
 
Old 07-24-2006, 01:11 AM Re: Search
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
Ok I'm willing to take a shot. The portuguese might slow me down, but it shouldn't stop me or anyone else.

Let me just make sure I understand things first though. The form you have at the bottom. Is it something you simply want to add to the page or is that form the one already on the page somewhere and you just want to modify it? And if you want to modify the form, how are you trying to change it.

I'm thinking you want to add the form you showed at the bottom as is and have removed the existing form you showed in the image in your first post since I don't see another form included in the html. Or is the form in one of the includes?

Is that right? Just want to make sure I understand the problem. Oh and if this is online somewhere can you also post a link? It might help some to see the page in addition to the code.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by vangogh; 07-24-2006 at 01:12 AM..
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 07-24-2006, 05:17 AM Re: Search
Super Talker

Posts: 128
Name: Jose daSilva
Trades: 0
Hi
Good Morning

Ok let see if I can explain better what really want to do.

The site has already the input selection on it. You can see at www.agimoura.com.

I would like to change that search type to the one with a multiple choices like for example this webmaster site has to search forums.

In another words, the way I did is the simple way that a person has to write in the input text submit box, the typology or the locality or the price that want to search.

Instead of the person to write, I would like to set up already the different typology, or different locality, and a different price ranges

Example: .

(Type of property TIPO) villa with(typology) 2 bedroom at/or/and (locality) Albufeira of/or/and (price) (€100.000,00 - €200.000,00) plus input text submit box, (available to write ) a specific property reference.

I hope that clarifies you of my intention.

Thank you

Jo

Last edited by josil; 07-24-2006 at 06:14 AM.. Reason: mistake at site's name
josil is offline
Reply With Quote
View Public Profile
 
Old 07-24-2006, 05:52 AM Re: Search
Super Talker

Posts: 128
Name: Jose daSilva
Trades: 0
Hi again

Here it is the translation of the portuguese words to help you

Tipo PROPERTY TYPE

ord= SEARCH ORDER FROM DATABASE

resultpesquisa SEARCH RESULT


idioma LANGUAGE

imagem IMAGE

ordenar TO SET ORDER


tipologia TYPOLOGY

localidade LOCALITY

concelho MUNICIPALITY

preco PRICE

referencia= reference

(Vivenda VILLA

Apartamento APARTMENT

Casa HOUSE

tipoimovelquartos BEDROOM BUILDING TYPE


tipoimovel BUILDING TYPE



include ("chamada.inc.php"); PHP FILE TO CALL FROM DB

$basedados= DATABASE NAME



carteira DATABASE DATA

situaçâo=1 (SITUATION=1 IF PROPERTY AVAILABLE

zonas_variaveis VARIABLE ZONES


campos_search FIELDS SEARCH


reg_pagina=28; NUMBER OF REGISTS PER PAGE



include("paginacao1.inc"); PHP FILE TO ORDER THE LISTINGS PER PAGE

resultado RESULT
registo REGIST

sector SECTOR

licenca LICENCE

vendido SOLD

chama CALL


ver-imo A PHP FILE TO SEE BUILDING DETAIILS


foto PHOTO

get_miniatura.php GET MINIATURE

cliente CLIENT

Ver Pedido TO SEE REQUEST

include("header0.inc.php") INCLUDE PHP FILE THAT SHOWS THE TOP HOME PAGE


include("topmain.inc") INCLUDE PHP FILE THAT SHOWS FIELDS WANT SO BUY OR WANT TO SELL


include("footer.inc.php") INCLUDES BOTTOM OF HOME PAGE
josil is offline
Reply With Quote
View Public Profile
 
Old 07-24-2006, 01:39 PM Re: Search
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
Cool. I understand what you want. You want to replace the single text box with a series of drop downs. Other than intergating the form itself visually the main thing will be changing the sql query you use to look up results, which I belive is:

if ($tipo) $sql="select * from carteira where situacao=1 and tipo='$tipo'";

Instead of basing the query on $tipo alone you would have a few more 'and's after the where clause for each of the possible drop downs you include.

So if you have drop downs for the price and locality there might be more clauses like:

and price = '$price', and locality = '$locality' after the where clause in the sql query. The specific names obviously depend on what they are called in the database and what names you give to the new <select>s
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 07-24-2006, 06:51 PM Re: Search
Super Talker

Posts: 128
Name: Jose daSilva
Trades: 0
That's good...but....
....did....

on the search.php:

if ($tipo) $sql="select * from carteira where situacao=1 and tipo='$tipo' and tipologia='$tipologia' and preco='$preco' localidade='$localidade'";
if (!$tipo) $sql="select * from carteira where situacao=1 ";
$order="order by $ord $ord2";

$zonas_variaveis="search=$search&idioma=$idioma&or d=$ord&ord2=$ord2&tipo=$tipo";
$campos_search="concelho referencia localidade tipologia preco descricaopt descricaouk";

The selects:

<form method="POST" action="<? echo "search.php?idioma=$idioma&ord=id&ord2=desc" ?>"

<font face="Verdana" >

</font><select name="tipo">

<option value='Vivenda'selected><? echo $lab_vivendas ?></option>

<option value='Apartamento'><? echo $lab_apartamentos ?></option>

<option value='Casa'><? echo $lab_casastipicas ?></option>

<option value='Quinta'><? echo $lab_quintas ?></option>

<option value='Ruina'><? echo $lab_ruinas ?></option>

<option value='Terreno'><? echo $lab_terrenos ?></option>

<option value='Comercio'><? echo $lab_comercios ?></option>

<option value='Investimento'><? echo $lab_investimentos ?></option>

</select>
&nbsp;

<name=search align=center><SELECT class=quicksearch
name="search"
<?


if ($tipo=="Vivenda") { print("
<option value='V0'"); if ($tipologia=="V0") echo "selected"; print (">V0</option>
<option value='V1'"); if ($tipologia=="V1") echo "selected"; print (">V1</option>
<option value='V1+1'"); if ($tipologia=="V1+1") echo "selected"; print (">V1+1</option>
<option value='V2'"); if ($tipologia=="V2") echo "selected"; print (">V2</option>
<option value='V2+1'"); if ($tipologia=="V2+1") echo "selected"; print (">V2+1</option>
<option value='V3'"); if ($tipologia=="V3") echo "selected"; print (">V3</option>
<option value='V4'"); if ($tipologia=="V4") echo "selected"; print (">V4</option>
<option value='V5'"); if ($tipologia=="V5") echo "selected"; print (">V5</option>
<option value='V6'"); if ($tipologia=="V6") echo "selected"; print (">V6</option>
<option value='V7'"); if ($tipologia=="V7") echo "selected"; print (">V7</option>
<option value='V8'"); if ($tipologia=="V8") echo "selected"; print (">V8</option>
<option value='V9'"); if ($tipologia=="V9") echo "selected"; print (">V9</option>
<option value='V10'"); if ($tipologia=="V10") echo "selected"; print (">V10</option>
<option value='V11'"); if ($tipologia=="V11") echo "selected"; print (">V11</option>
<option value='V12'"); if ($tipologia=="V12") echo "selected"; print (">V12</option>"); }

if ($tipo=="Apartamento") { print("
<option value='T0'"); if ($tipologia=="T0") echo "selected"; print (">T0</option>
<option value='T0+1'"); if ($tipologia=="T0+1") echo "selected"; print (">T0+1</option>
<option value='T0+2'"); if ($tipologia=="T0+2") echo "selected"; print (">T0+2</option>
<option value='T0- Duplex'"); if ($tipologia=="T0-Duplex") echo "selected"; print (">T0 - Duplex</option>
<option value='T1'"); if ($tipologia=="T1") echo "selected"; print (">T1</option>
<option value='T1- Duplex'"); if ($tipologia=="T1-Duplex") echo "selected"; print (">T1- Duplex</option>
<option value='T1+1'"); if ($tipologia=="T1+1") echo "selected"; print (">T1+1</option>
<option value='T2'"); if ($tipologia=="T2") echo "selected"; print (">T2</option>
<option value='T2- Duplex'"); if ($tipologia=="T2-Duplex") echo "selected"; print (">T2- Duplex</option>
<option value='T2+1'"); if ($tipologia=="T2+1") echo "selected"; print (">T2+1</option>
<option value='T3'"); if ($tipologia=="T3") echo "selected"; print (">T3</option>
<option value='T3- Duplex'"); if ($tipologia=="T3-Duplex") echo "selected"; print (">T3- Duplex</option>
<option value='T4'"); if ($tipologia=="T4") echo "selected"; print (">T4</option>
<option value='T4- Duplex'"); if ($tipologia=="T4-Duplex") echo "selected"; print (">T4- Duplex</option>
<option value='T5'"); if ($tipologia=="T5") echo "selected"; print (">T5</option>
<option value='T6'"); if ($tipologia=="T6") echo "selected"; print (">T6</option>"); }

if ($tipo=="Quinta") { print("
<option value='Quinta'"); if ($tipologia=="Quinta") echo "selected"; print (">Quinta</option>
<option value='V0'"); if ($tipologia=="V0") echo "selected"; print (">V0</option>
<option value='V1'"); if ($tipologia=="V1") echo "selected"; print (">V1</option>
<option value='V1+1'"); if ($tipologia=="V1+1") echo "selected"; print (">V1+1</option>
<option value='V2'"); if ($tipologia=="V2") echo "selected"; print (">V2</option>
<option value='V2+1'"); if ($tipologia=="V2+1") echo "selected"; print (">V2+1</option>
<option value='V3'"); if ($tipologia=="V3") echo "selected"; print (">V3</option>
<option value='V4'"); if ($tipologia=="V4") echo "selected"; print (">V4</option>
<option value='V5'"); if ($tipologia=="V5") echo "selected"; print (">V5</option>
<option value='V6'"); if ($tipologia=="V6") echo "selected"; print (">V6</option>
<option value='V7'"); if ($tipologia=="V7") echo "selected"; print (">V7</option>
<option value='V8'"); if ($tipologia=="V8") echo "selected"; print (">V8</option>
<option value='V9'"); if ($tipologia=="V9") echo "selected"; print (">V9</option>
<option value='V10'"); if ($tipologia=="V10") echo "selected"; print (">V10</option>
<option value='V11'"); if ($tipologia=="V11") echo "selected"; print (">V11</option>
<option value='V12'"); if ($tipologia=="V12") echo "selected"; print (">V12</option>"); }

if ($tipo=="Casa") { print("
<option value='Casa Tipica'"); if ($tipologia=="Casa Tipica") echo "selected"; print (">Casa Tipica</option>
<option value='V0'"); if ($tipologia=="V0") echo "selected"; print (">V0</option>
<option value='V1'"); if ($tipologia=="V1") echo "selected"; print (">V1</option>
<option value='V1+1'"); if ($tipologia=="V1+1") echo "selected"; print (">V1+1</option>
<option value='V2'"); if ($tipologia=="V2") echo "selected"; print (">V2</option>
<option value='V2+1'"); if ($tipologia=="V2+1") echo "selected"; print (">V2+1</option>
<option value='V3'"); if ($tipologia=="V3") echo "selected"; print (">V3</option>
<option value='V4'"); if ($tipologia=="V4") echo "selected"; print (">V4</option>
<option value='V5'"); if ($tipologia=="V5") echo "selected"; print (">V5</option>
<option value='V6'"); if ($tipologia=="V6") echo "selected"; print (">V6</option>
<option value='V7'"); if ($tipologia=="V7") echo "selected"; print (">V7</option>
<option value='V8'"); if ($tipologia=="V8") echo "selected"; print (">V8</option>
<option value='V9'"); if ($tipologia=="V9") echo "selected"; print (">V9</option>
<option value='V10'"); if ($tipologia=="V10") echo "selected"; print (">V10</option>
<option value='V11'"); if ($tipologia=="V11") echo "selected"; print (">V11</option>
<option value='V12'"); if ($tipologia=="V12") echo "selected"; print (">V12</option>"); }

if ($tipo=="Ruina") { print("
<option value='Ruina'"); if ($tipologia=="Ruina") echo "selected"; print (">Ruina</option>
<option value='Recuperável'"); if ($tipologia=="Recuperável") echo "selected"; print (">Recuperável</option>
<option value='Não recuperável'"); if ($tipologia=="Não recuperável") echo "selected"; print (">Não Recuperável</option>"); }

if ($tipo=="Terreno") { print("
<option value='Urbano'"); if ($tipologia=="Urbano") echo "selected"; print (">Urbano</option>
<option value='Rustico'"); if ($tipologia=="Rustico") echo "selected"; print (">Rustico</option>
<option value='Lote'"); if ($tipologia=="Lote") echo "selected"; print (">Lote</option>
<option value='Urbanização'"); if ($tipologia=="Urbanização") echo "selected"; print (">Urbanização</option>"); }

if ($tipo=="Comercio") { print("
<option value='Venda'"); if ($tipologia=="Venda") echo "selected"; print (">Venda</option>
<option value='Trespasse'"); if ($tipologia=="Trespasse") echo "selected"; print (">Trespasse</option>
<option value='Cedência'"); if ($tipologia=="Cedência") echo "selected"; print (">Cedência</option>"); }

if ($tipo=="Investimento") { print("
<option value='Venda'"); if ($tipologia=="Venda") echo "selected"; print (">Venda</option>
<option value='Trespasse'"); if ($tipologia=="Trespasse") echo "selected"; print (">Trespasse</option>
<option value='Cedência'"); if ($tipologia=="Cedência") echo "selected"; print (">Cedência</option>"); }

if ($tipo=="Empreendimento") { print("
<option value='Venda'"); if ($tipologia=="Venda") echo "selected"; print (">Venda</option>
"); }
?>

</select>
&nbsp;



<name=search align=center><SELECT class=quicksearch
name="search"

<?

if ($tipo=="Vivenda" or $tipo=="Apartamento" or $tipo=="Casa" or $tipo=="Quinta" or $tipo=="Ruina" or $tipo=="Terreno" or $tipo=="Comercio" or $tipo=="Investimento") {
print("


<option value='Albufeira'"); if ($concelho=="Albufeira") echo "selected"; print (">Albufeira</option>

<option value='Alcoutim'"); if ($concelho=="Alcoutim") echo "selected"; print (">Alcoutim</option>

<option value='Aljezur'"); if ($concelho=="Aljezur") echo "selected"; print (">Aljezur</option>

<option value='Castro Marim'"); if ($concelho=="Castro Marim") echo "selected"; print (">Castro Marim</option>

<option value='Faro'"); if ($concelho=="Faro") echo "selected"; print (">Faro</option>

<option value='Lagoa'"); if ($concelho=="Lagoa") echo "selected"; print (">Lagoa</option>

<option value='Lagos'"); if ($concelho=="Lagos") echo "selected"; print (">Lagos</option>

<option value='Loulé'"); if ($concelho=="Loulé") echo "selected"; print (">Loulé</option>

<option value='Monchique'"); if ($concelho=="Monchique") echo "selected"; print (">Monchique</option>

<option value='Olhão'"); if ($concelho=="Olhão") echo "selected"; print (">Olhão</option>

<option value='Portimão'"); if ($concelho=="Portimão") echo "selected"; print (">Portimão</option>

<option value='São Braz'"); if ($concelho=="São Braz") echo "selected"; print (">São Braz</option>

<option value='Silves'"); if ($concelho=="Silves") echo "selected"; print (">Silves</option>

<option value='Tavira'"); if ($concelho=="Tavira") echo "selected"; print (">Tavira</option>

<option value='Vila do Bispo'"); if ($concelho=="Vila do Bispo") echo "selected"; print (">Vila do Bispo</option>

<option value='Vila Real'"); if ($concelho=="Vila Real") echo "selected"; print (">Vila Real</option>

</select> "); }


?>



<name=search align=center><SELECT class=quicksearch
name="search"

<?



if ($tipo=="Vivenda" or $tipo=="Apartamento" or $tipo=="Casa" or $tipo=="Quinta" or $tipo=="Ruina" or $tipo=="Terreno" or $tipo=="Comercio" or $tipo=="Investimento") {
print("
<option value='<€100.000,00' "); if ($preco=="<€100.000,00") echo "selected"; print (">€100.000,00</option>
<option value='€100.001,00 - €150.000,00' "); if ($preco=="€100.001,00 - €150.000,00") echo "selected"; print (">€100.001,00 - €150.000,00</option>
<option value='€150.001,00 - €200.000,00' "); if ($preco=="€150.001,00 - €200.000,00") echo "selected"; print (">€150.001,00 - €200.000,00</option>

"); }






?>

</DIV>
</SELECT>


<INPUT class=button bgcolor="#00600" type=submit value="search"></form>




....does not work.
josil is offline
Reply With Quote
View Public Profile
 
Old 07-24-2006, 11:36 PM Re: Search
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
For the new <select>s you've added you have them with name="seaach" They'll should have unique names, so name="tipologia" etc.

Also above the sql query in the code you'll want to convert the variable from the $_POST array to the varuables you're using.

$tipologia = $_POST['tipologia'];

I think that will work.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Reply     « Reply to Search
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.58532 seconds with 13 queries