Bonjour voila j ai un site qui reference les artisans suivant leurs metiers et departement/ville ect , je souhaiterais creer un moteur qui quand on est sur la page de tel departement cherche dans ce departement
Pour l'instant j'ai le debut de mon script , ce bout la marche mais le probleme c'est que ca cherche dans tout les departements :?
De plus j aurais voulu egalement une recherche par image style google et la je seche :/
Pour l'instant j'ai le debut de mon script , ce bout la marche mais le probleme c'est que ca cherche dans tout les departements :?
De plus j aurais voulu egalement une recherche par image style google et la je seche :/
Code:
<? include('bandeau.php'); ?>
<? include('connexion.php');?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30" colspan="3" align="center">
<form name="form1" method="post" action="recherche.php">
<p> </p>
<p>RECHERCHE D'UNE ACTIVITE PAR MOTS CLES</p>
<p> </p>
<p>Mots clés:
<input name="mots" type="text" id="mots" size="50">
</p>
<p>
<input type="submit" name="Submit" value="Envoyer">
</p>
</form>
<div id="search">
<a href="#" style="font-size: 10px">Images</a> <a href="#" style="font-size: 10px">Profession</a> <a href="#" style="font-size: 10px">Vous referencer</a> <a href="#" style="font-size: 10px">Créer votre site</a>
<a href="contact_2.php" style="font-size: 10px"> Votre Avis</a>
</div>
</td>
</tr>
<tr class="titre">
<td width="25%">Nom</td>
<td width="56%">Activité</td>
<td width="19%">Ville</td>
</tr>
<tr>
<td height="30" colspan="3">
<?
/*$query = "SELECT * FROM therapie WHERE dep = '".$departement."'";*/
/*$query = "SELECT * FROM therapie WHERE dep = '".$departement."' AND WHERE MATCH (nom, prenom, metier, descri, biographie, conseil, reve, accueil, comment, cml1, cml2, cml3, cml4, cml5, cml6, cml7, cml8, cml9, interview, bim00, bim01, bim02, bim03, bim04, bim05, bim06, bim07, bim08) AGAINST ('".$mots."')";*/
$query = "SELECT * FROM therapie WHERE MATCH (nom,prenom,metier,spe,ville,accueil,dep,interview,nom_dep) AGAINST ('".$mots."')" ;
$result = mysql_query($query);
if($result){
while($r = mysql_fetch_object($result)){
$nom = StripSlashes($r->nom);
$metier = StripSlashes($r->metier);
$ville = StripSlashes($r->ville);
$prenom = StripSlashes($r->prenom);
?>
<table width="100%" border="0" align="center">
<tr>
<td width="220"><a href="site/index.php?id=<?=$r->id?>&nam=<?=$nam?>">
<?=$prenom?>
<?=$nom?>
</a></td>
<td width="500"><?=$metier?></td>
<td width="162"><?=$ville?></td>
</tr>
</table>
<?
}
}else{
echo"erreur de requête";
}
?>
</td>
</tr>
</table>
<? include ('site/pied.php')?>