Bon j’ai fait ce code et j’aimerai l’amélioré vous pouvez m’aidez svp
<? include "conect.php";?>
<html>
<form method="POST" action="">
Rechercher un mot : <input type="text" name="recherche">
<input type="SUBMIT" value="Search!">
</form>
</html>
<?php
$recherche = isset($_POST['recherche']) ? $_POST['recherche'] : '';
$sql = mysql_query(
"SELECT objet, satisfaction FROM demande WHERE objet LIKE '%$recherche%'" .
" OR satisfaction LIKE '%$recherche%'") or die (mysql_error());
while(list($objet, $satisfaction)=mysql_fetch_array($sql)){
echo 'Resultat de la recherche: '.$objet.', '.$satisfaction.' <br />';
}
?>
|