bonjour a tous
j'ai un probleme , j'ai un code qui me permet de recherche des informations contenu dans une seule table mais je veux recherche une informations dans toute la base mysql
voici mon code
<html>
<head>
</head>
<body>
<?php
$connect=mysql_connect("127.0.0.1", "root", "") or die ("Echec de la connexion au serveur !");
$select=mysql_select_db("base");
$query="select * from individu , appartenir where individu.nom_ind=appartenir_nom_ind";
$result=mysql_query($query);
$totenreg=mysql_num_rows($result);
if ($totenreg==0) // si il n'y a rien dans le champs de recherche
echo "<td colspan=9 align=center bgcolor='#000000'><h2>IL N'Y A PAS DE INDIVIDU A RECHERCHER</td>";
else if (!(empty($_POST["recherche"]))) // sinon il y a recherche
{
echo "<table width=100% border=1 align=center>";
echo "<td colspan=9><h2>RECHERCHER INDIVIDU(S)</td>";
echo "</tr>";
echo "<tr align=center bgcolor=#87CEEB>";
echo "<td><h4 class='h41'>NOM</td>";
$i=0;
while ($row=mysql_fetch_array($result))
{
if (stristr($row[$_POST["choix"]], $_POST["recherche"]))
{
if ($i==0)
{
echo "<tr bgcolor=#D3D3D3>";
$i++;
}
else
{
echo "<tr bgcolor=#FFFFFF>"; //affichage des informations de la base selon la recherche demander
$i--;
}
echo "<td><h5>".$row["nom_ind"]."</td>";
echo "</tr>";
}
}
echo "</table>";
}
else
echo "<h4>Veuillez remplir le champ recherche !";
?>
</body>
</html>
et a la fin je veux mettre un lien qui permet d'afficher tous les informations concnant ma recherche
merci de votre aide