Aidez moi j'ai un problème avec mon code de recherche en php

<?php
if(isset($_POST['recherche'])){
$recherche=$_POST['recherche'];
if ($recherche==""){
echo"entrer le matricule";
}
else{
$reket= "SELECT * FROM information WHERE matricule LIKE %$recherche%";
$res= mysql_query($reket) or die(mysql_error());
}
}
while($reket=mysql_fetch_array($res)){
?>
<tr><td>matricule</td><tr>
<td>nom</td></tr><tr><td>prenom</td></tr><tr><td>contact</td></tr><tr><td>email</td></tr><tr><td>service</td></tr><tr><td>photo</td></tr><tr><td><?php echo $reket['matricule'];?> <tr><td><?php echo $reket['nom'];?></td></tr><tr><td><?php echo $reket['prenom'];?></td></tr><tr><td><?php echo $reket['email'];?></td></tr><tr><td><?php echo $reket ['service'];?> </td></tr><tr><td><?php echo $reket ['photo'];?></td></tr>
<?php
}

?>

<body><form method="post" enctype="multipart/form-data">
<p>recherche<input type="text" name="recherche" ></p>
<label>

<input type="submit" name="OK" value="OK" align="right" />
</label>
</form>

4 réponses

  1. Contributeur
    C'est une blague ?
    0
    1. si tu peux m'aider ?
      0
  2. le problème se situe au niveau du "while($reket=mysql_fletch_array($res)) c'est ce que me signale!
    0
    1. salut, je vais peut être dire un bêtise car en général j'utilise PDO.

      Mais ton while...

      while($reket=mysql_fletch_array($res))

      tu as mis fletch au lieu de je pense fetch et $reket ne devrais pas porter un autre nom ?

      (¯'·.¸¸.·'¯'·.¸¸.-> <-.¸¸.·'¯'·.¸¸.·'¯)
      0