Transfert de données d'un page aa l'autre

cobra176 Messages postés 86 Date d'inscription mercredi 1 novembre 2000 Statut Membre Dernière intervention 21 janvier 2009 - 26 févr. 2007 à 12:30
cobra176 Messages postés 86 Date d'inscription mercredi 1 novembre 2000 Statut Membre Dernière intervention 21 janvier 2009 - 26 févr. 2007 à 15:01
bonjour a tous
j'ai un probleme de transfert de données
j'ai fait un moteur de recherche sur un base sql
il m'affiche certains que lui indique puis je veut faire une fonction qui m'affiche tout dans un formulaire

voici mes codes pour aider

le moteur de recherche

<html>


<head>


<title>Rechercher</title>
<link href="css/style2.css" rel="stylesheet" type="text/css">


</head>




  <form action='scripts/recherche.php' target="rechbas" method='post' name="rechercher" enctype="multipart/form-data">
          ----

        ,
        ,
     
   

          ----

        nom,
        organisme,
     
   

  </form>




</html>

l'affichage des resultat

 <?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";
    $result=mysql_query($query);
    $totenreg=mysql_num_rows($result);


echo "<form action='http://127.0.0.1/muse/recherche/scripts/fiche.php' method='post' name='fiche' enctype='multipart/form-data'>";
   


 


    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 CLIENTS A RECHERCHER</td>";
    else if (!(empty($_POST["recherche"]))) // sinon  il y a recherche
    {
 
      echo "\";

      echo \"<h2>RECHERCHER INDIVIDU(S), \";
      echo \"\";
     echo \"----
\";
      echo \"<h4 class='h41'>NOM, \";
      echo \"<h4 class='h41'>PRENOM, \";
      echo \"<h4 class='h41'>, \";

      $i=0;
      while ($row=mysql_fetch_array($result))
      {
        if (stristr($row[$_POST[\"choix\"]], $_POST[\"recherche\"]))
        {
          if ($i==0)
          {
            echo \"----
\";
            $i++;
          }
          else
          {
            echo \"----
\"; //affichage des informations de la base selon la recherche demander
            $i--;
          }
          echo \"<h5>".$row["nom_ind"].", \";
          echo \"<h5>".$row["prenom_ind"].", \";
echo \"<h5>".$row["id_ind"].", \";
    $id=$row[\"id_ind\"];
          echo \", \";

          echo \"\";
        }
      }
      echo "
";
    }
    else
      echo "<h4>Veuillez remplir le champ recherche !";


  ?>

puis la fiche complete

echo"$id";
    $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 where id_ind='$id'";
    $result=mysql_query($query);
    $totenreg=mysql_num_rows($result); //retourne le nombre de lignes du résultat


    echo "<form action='scripts/edite.php' method='post' name='editer' enctype='multipart/form-data'>";
    echo "<table width=100% border=1 align=center>";
    echo "<tr bgcolor='#FFFFFF'>";
    if ($totenreg==0)
      echo "<td colspan=6><h2>IL N'Y A PAS DE INDIVIDUS A EDITER</td>";
    else
    {
      // choix des clients à modifier
      while ($row=mysql_fetch_array($result))
      {


        echo "<h5>".$row["nom_ind"]."";//retourne une ligne de résultat MySQL sous la forme d'un tableau pour pouvoir les modifier
        echo "<h5>".$row["prenom_ind"]."";
  $nom=$row["prenom_ind"];
  $prenom=$row["nom_ind"];
      }


    }


 ?>

mon probleme concerne le transfert de id_ind de la fiche choisi du fichier d'affichage des résultat a fiche

merci de votre aide

1 réponse

cobra176 Messages postés 86 Date d'inscription mercredi 1 novembre 2000 Statut Membre Dernière intervention 21 janvier 2009
26 févr. 2007 à 15:01
c'est bon j'ai trouvé
0
Rejoignez-nous