Ejemplo n.º 1
0
                 $ligne["defi"] = $row["defi"];
                 $ligne["realisateurDefi"] = $row["realisateurDefi"];
                 $ligne["lanceurDefi"] = $row["lanceurDefi"];
                 $ligne["commentaireRealisateurDefi"] = $row["commentaireRealisateurDefi"];
                 $ligne["cheminPreuve"] = $row["cheminPreuve"];
                 $ligne["typePreuve"] = $row["typePreuve"];
                 array_push($response["cerclePrive"], $ligne);
             }
         }
     }
     echo json_encode($response);
 } else {
     if ($tag == "rechercherAmi") {
         $pseudoOuEmail = $_POST['pseudoOuEmail'];
         $pseudoOuEmailPerso = $_POST['pseudoOuEmailPerso'];
         $result = $db->rechercherAmiPseudo($pseudoOuEmail, $pseudoOuEmailPerso);
         $result2 = $db->rechercherAmiEmail($pseudoOuEmail, $pseudoOuEmailPerso);
         $response["rechercherAmi"] = array();
         if ($result) {
             $response["rechercherAmi"] = array();
             while ($row = mysql_fetch_array($result)) {
                 $ligne = array();
                 //$idDefi=$row["idDefi"];
                 $ligne["pseudo"] = $row["pseudo"];
                 $ligne["email"] = $row["email"];
                 $ligne["age"] = $row["age"];
                 $ligne["avatar"] = $row["avatar"];
                 // push single row into final response array
                 array_push($response["rechercherAmi"], $ligne);
             }
             $response["success"] = 1;