Réponse acceptée !
Vlà
<html>
<?php include('metatags/metatags-general.inc');
$r = explode(' ', $_GET['r']);
$last_word = $r[count($r)-1];
while(list($num, $word) = each($r)){
$req = '`cles` LIKE "%'.$word.'%"';
if($last_word != $word){
$req .= ' OR ';
}
}
include('__conf/mysql_conf.inc');
mysql_connect($serveur, $base, $pass);
mysql_select_db('sonarty');
$requete = mysql_query('SELECT id,titre,des,url,cles FROM sonarty_tout WHERE '.$req.';');
$id=mysql_num_rows($requete);
$requete2 = mysql_query('SELECT id,clee FROM sonarty_clee WHERE '.str_replace('`cles`', '`clee`', $req).';');
?>
<head>
<title>Sonarty - Résultat de la recherche</title>
</head>
<body topmargin="0" bottommargin="0">
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="762" HEIGHT="100%" ALIGN="CENTER">
<TD WIDTH="11" BACKGROUND="__img/site_01.jpg"> </TD>
<TD WIDTH="740" BGCOLOR="WHITE" VALIGN=TOP">
<table align="left" border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td align="left" width="740" height="73" background="__img/site_12.png">
<?php include('__inc/page-haut.inc'); ?>
</td>
</tr><tr>
<td height="13" background="__img/site_05.png">
</td>
</tr>
<tr>
<td height="8"></td>
</tr>
<tr>
<?php include('__inc/menu-haut.inc'); ?>
</tr>
<tr>
<td width="740" height="1" bgcolor="black"></td>
</tr>
<tr>
<td width="740" align="center" height="65" background="__img/site_13.png"><? include('__pub/script-pub.php'); ?></td>
</tr>
<tr>
<td width="740" height="1" bgcolor="black"></td>
</tr>
<tr>
<td width="740" align="left">
<br>
<table border="0" width="740" cellspacing="0" cellpadding="0">
<td align="left">
<b><font color="gray" face="Verdana" size="2"><? echo $r; ?> ></font></b>
</td>
<td align="right">
<b><font color="gray" face="Verdana" size="2">
Il y a <?php echo $id; ?> résultat(s)
</font></b>
</td>
</table><br>
<?php
while ($donnees = mysql_fetch_array($requete) )
{
?>
<table border="0" cellpadding="3" cellspacing="0">
<td>
<a href="<? echo $donnees['url']; ?>"><font color="blue" size="3"><? echo $donnees['titre']; ?></font></a><br>
<font size="2">
<? echo $donnees['des']; ?>
</font><br>
<font size="2" color="green">
Infos : <? echo $donnees['url']; ?> - ID : <? echo $donnees['id']; ?> - <a style="text-decoration:none" href="#"><font color="green">Haut de page</font></a>
</font><br></td></table>
<?
}
mysql_close();
?>
<br>
</td>
</tr>
<tr>
<td height="13" background="__img/site_15.png" width="740"></td>
</tr>
<tr>
<td height="13" background="__img/site_14.png" width="740"></td>
</tr>
</table>
</TD>
<TD WIDTH="11" BACKGROUND="__img/site_02.jpg"> </TD>
</TABLE>
</body>
</html>
@+
Immortal-PC,
téléchargements,astuces ,entre-aide informatique , conseils pour vos problèmes d'ordi.
Grâce à Immortal-PC votre ordinateur passera les âges.