Ma requête AJAX de JS vers PHP ne fonctionne pas
Résolu
JC_8280
Messages postés
78
Date d'inscription
Statut
Membre
Dernière intervention
-
jordane45 Messages postés 38486 Date d'inscription Statut Modérateur Dernière intervention -
jordane45 Messages postés 38486 Date d'inscription Statut Modérateur Dernière intervention -
Bonjour,
Je débute en programmation et je suis en train de faire mon premier projet et je bloque sur une requête AJAX.
1°) J' ai affiché sur une page web un tableau de ma base de données MySQL, ensuite je veux le filtrer en ne gardant que des éléments déterminés dans un formulaires multicritères html.
J'ai testé la requête du PHP dans la table MySQL, ça marche.
Je pense que le problème se situe dans la requête JS ou bien la réception dans le PHP.
2°) Il faut aussi que j'inverse le résultat de ma requête, car pour l'instant j' efface les éléménts que je veux garder, je n'ai pas encore réfléchi à ce problème.
Merci par avance pour votre aide.
Le formulaire, le JS et le PHP sont dans 3 fichiers différents, mais je pense que cela ne gêne pas.
Le code ci-dessous
Formulaire HTML :
CODE JAVA SCRIPT
FICHIER PHP
JC
EDIT : remise en forme partielle du code...
Je débute en programmation et je suis en train de faire mon premier projet et je bloque sur une requête AJAX.
1°) J' ai affiché sur une page web un tableau de ma base de données MySQL, ensuite je veux le filtrer en ne gardant que des éléments déterminés dans un formulaires multicritères html.
J'ai testé la requête du PHP dans la table MySQL, ça marche.
Je pense que le problème se situe dans la requête JS ou bien la réception dans le PHP.
2°) Il faut aussi que j'inverse le résultat de ma requête, car pour l'instant j' efface les éléménts que je veux garder, je n'ai pas encore réfléchi à ce problème.
Merci par avance pour votre aide.
Le formulaire, le JS et le PHP sont dans 3 fichiers différents, mais je pense que cela ne gêne pas.
Le code ci-dessous
Formulaire HTML :
<!-- ****** FORMULAIRE RECHERCHER ****** --> <form id='idFormRechercher' action="" method="post"> * ** *** **** ***** ****** ******* ******** ********* ********** ***********CRITERES de SELECTION*********** <!-- ****** BOUTONS RECHERCHE ****** --> <div class = "boutonsRecherche"> <!-- ****** BOUTON VALIDER RECHERCHE ****** --> <input id = "idboutonValiderRecherche" class = 'classboutonValiderRecherche' type = "submit" value = "VALIDER">
CODE JAVA SCRIPT
//BOUTON VALIDER RECHERCHE // reference www.w3schools.com -> JAVA SCRIPT / JSON PHP let boutonValiderRecherche = document.getElementById('idboutonValiderRecherche'); boutonValiderRecherche.addEventListener('click',validerRecherche) ;function validerRecherche(){ var xmlhttp ="", resultRecherche = "", x ="", idRow ="" ; xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { resultRecherche = JSON.parse(this.responseText); for (x in resultRecherche) { idRow = document.getElementById('x'); idRow.style.display = 'none'; } } }; xmlhttp.open("POST", "trouver.php", true);xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");xmlhttp.send(); }
FICHIER PHP
header("Content-Type: application/json; charset=UTF-8"); $_POST = json_decode($_POST["x"], false); $VR = []; $VR0=$VR1=$VR2=$VR3=$VR4=$VR5=$VR6=$VR7=$VR8=$VR9=$VR10=$VR11=$VR12= $VR13=$VR14=$VR15=$VR16=$VR17=$VR18=$VR19=$VR20=$VR21=$VR22=$VR23=""; $_POST["id"]=""; // à enlever lors des implementations dans recherche.php $_POST["RefMag"]=""; // à enlever $_POST["Caract2"]="";// à enlever function cleanData($dataToClean){ $dataToClean = trim($dataToClean); $dataToClean = stripslashes($dataToClean); $dataCleaned = htmlspecialchars($dataToClean); return $dataCleaned; } $VR0 = cleanData($_POST["id"]); $VR1 = cleanData($_POST["RefMag"]); $VR2 = cleanData($_POST["familleOutil"]); $VR3 = cleanData($_POST["SousFamille"]); $VR4 = cleanData($_POST["Matiere"]); $VR5 = cleanData($_POST["NbreZ"]); $VR6 = cleanData($_POST["Dia1"]); $VR7 = cleanData($_POST["Long1"]); $VR8 = cleanData($_POST["Dia2"]); $VR9 = cleanData($_POST["Dia3"]); $VR10 = cleanData($_POST["LongUtile"]); $VR11 = cleanData($_POST["LongTotale"]); $VR12 = cleanData($_POST["Caract1"]); $VR13 = cleanData($_POST["Caract2"]); $VR14 = cleanData($_POST["Fournisseur"]); $VR15 = cleanData($_POST["Ref_Fournisseur"]); $VR16 = cleanData($_POST["Prix"]); $VR17 = cleanData($_POST["QteMini"]); $VR18 = cleanData($_POST["CasEmploi1"]); $VR19 = cleanData($_POST["CasEmploi2"]); $VR20 = cleanData($_POST["CasEmploi3"]); $VR21 = cleanData($_POST["CasEmploi4"]); $VR22 = cleanData($_POST["CasEmploi5"]); $VR23 = cleanData($_POST["CasEmploi6"]); // colonne de la table $VR = array ("id"=>"$VR0", "REF_MAG"=>"$VR1", "FAMILLE_OUTIL"=>"$VR2", "SOUS_FAMILLE"=>"$VR3", "MATIERE_OUTIL"=>"$VR4", "NBRE_Z"=>"$VR5", "DIA_1"=>"$VR6", "LONGUEUR_1"=>"$VR7", "DIA_2"=>"$VR8", "DIA_3"=>"$VR9", "LONG_UTILE"=>"$VR10", "LONG_TOTALE"=>"$VR11", "CARACT_1"=>"$VR12", "CARACT_2"=>"$VR13", "FOURNISSEUR"=>"$VR14", "REF_FOURNISSEUR"=>"$VR15", "PRIX"=>"$VR16", "QTE_MINI"=>"$VR17", "CAS_EMPLOI_1"=>"$VR18", "CAS_EMPLOI_2"=>"$VR19", "CAS_EMPLOI_3"=>"$VR20", "CAS_EMPLOI_4"=>"$VR21", "CAS_EMPLOI_5"=>"$VR22", "CAS_EMPLOI_6"=>"$VR23"); $concat = "" ; foreach($VR as $VRn => $VRn_value){ if($VRn_value !== ""){ $concat = $concat. 'AND '.$VRn.' = \''.$VRn_value.'\' '; }; }; $condition = ltrim($concat,"AND"); // echo 'Concat = ' .$concat; //echo ' et Condition = '.$condition; /* *************************************************** *//* REQUETE *//* *************************************************** */ $serveur = "localhost"; $login = "root"; $pass = ""; try{ $connexion = new PDO("mysql:host=$serveur;dbname=hydro", $login, $pass); $connexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $requete = $connexion->query('SELECT id FROM cutting_tools_01 WHERE' . $condition ); $resultat = $requete->fetchAll(PDO::FETCH_ASSOC); echo json_encode($resultat); } catch(PDOException $e){ echo 'ECHEC : ' .$e->getMessage(); }
JC
EDIT : remise en forme partielle du code...
A voir également:
- Ma requête AJAX de JS vers PHP ne fonctionne pas
- Easy php - Télécharger - Divers Web & Internet
- Windows 7 vers windows 10 - Accueil - Mise à jour
- Clavier qwerty vers azerty - Guide
- Vers quelle adresse web renvoie ce lien - Guide
- Envoyer vers destinataire ne fonctionne pas - Guide
21 réponses
Bonjour,
J'ai essayé de remettre un peu en forme ton code en y ajoutant des retours à la ligne et en utilisant les balises de code.
Explications disponibles ici :https://codes-sources.commentcamarche.net/faq/11288-poster-un-extrait-de-code.
Ensuite, pour déterminer d'où vient le souci, commence par afficher l'onglet "console" de ton navigateur internet et regarde ce qu'il t'affiche quand tu essaies de faire appel à ta fonction ajax.
Pense aussi à activer la gestion des erreurs PHP et la gestion des erreurs PDO;
Voici quelques conseils à suivre :
https://forums.commentcamarche.net/forum/affich-37584947-php-gestion-des-erreurs-debogage-et-ecriture-du-code
https://forums.commentcamarche.net/forum/affich-37584941-php-pdo-gerer-les-erreurs
Reviens nous voir avec ton code modifié si ton souci persiste.
J'ai essayé de remettre un peu en forme ton code en y ajoutant des retours à la ligne et en utilisant les balises de code.
Explications disponibles ici :https://codes-sources.commentcamarche.net/faq/11288-poster-un-extrait-de-code.
Ensuite, pour déterminer d'où vient le souci, commence par afficher l'onglet "console" de ton navigateur internet et regarde ce qu'il t'affiche quand tu essaies de faire appel à ta fonction ajax.
Pense aussi à activer la gestion des erreurs PHP et la gestion des erreurs PDO;
Voici quelques conseils à suivre :
https://forums.commentcamarche.net/forum/affich-37584947-php-gestion-des-erreurs-debogage-et-ecriture-du-code
https://forums.commentcamarche.net/forum/affich-37584941-php-pdo-gerer-les-erreurs
Reviens nous voir avec ton code modifié si ton souci persiste.
Côté PHP, j'ai également revu un peu ton code
essaye le et montre nous le résultat dans la console. (pense à déplier, comme sur ma capture d'écran, les petites flêches qui se trouvent devant les ligne xmlhttprequest.. )
essaye le et montre nous le résultat dans la console. (pense à déplier, comme sur ma capture d'écran, les petites flêches qui se trouvent devant les ligne xmlhttprequest.. )
<?php header("Content-Type: application/json; charset=UTF-8"); error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE); //$_POST = json_decode($_POST["x"], false); // c'est quoi t'est-ce pourquoi pour ????!!! //--------------------------------------------------------------------------// // fonctions diverses... //--------------------------------------------------------------------------// function cleanData($dataToClean=NULL){ $dataToClean = !empty($dataToClean) ? trim($dataToClean) : ""; $dataToClean = stripslashes($dataToClean); //$dataCleaned = htmlspecialchars($dataToClean);// Jamais pour le traitement en BDD.. seulement à l'affichage ! return $dataCleaned; } //--------------------------------------------------------------------------// //connexion à la bdd //--------------------------------------------------------------------------// require_once "cnxbdd.php"; //--------------------------------------------------------------------------// // Variables .. //--------------------------------------------------------------------------// $VR = array(); $resultat = array(); $VR0 = cleanData($_POST["id"]); $VR1 = cleanData($_POST["RefMag"]); $VR2 = cleanData($_POST["familleOutil"]); $VR3 = cleanData($_POST["SousFamille"]); $VR4 = cleanData($_POST["Matiere"]); $VR5 = cleanData($_POST["NbreZ"]); $VR6 = cleanData($_POST["Dia1"]); $VR7 = cleanData($_POST["Long1"]); $VR8 = cleanData($_POST["Dia2"]); $VR9 = cleanData($_POST["Dia3"]); $VR10 = cleanData($_POST["LongUtile"]); $VR11 = cleanData($_POST["LongTotale"]); $VR12 = cleanData($_POST["Caract1"]); $VR13 = cleanData($_POST["Caract2"]); $VR14 = cleanData($_POST["Fournisseur"]); $VR15 = cleanData($_POST["Ref_Fournisseur"]); $VR16 = cleanData($_POST["Prix"]); $VR17 = cleanData($_POST["QteMini"]); $VR18 = cleanData($_POST["CasEmploi1"]); $VR19 = cleanData($_POST["CasEmploi2"]); $VR20 = cleanData($_POST["CasEmploi3"]); $VR21 = cleanData($_POST["CasEmploi4"]); $VR22 = cleanData($_POST["CasEmploi5"]); $VR23 = cleanData($_POST["CasEmploi6"]); // colonne de la table $VR = array ("id"=>$VR0, "REF_MAG"=>$VR1, "FAMILLE_OUTIL"=>$VR2, "SOUS_FAMILLE"=>$VR3, "MATIERE_OUTIL"=>$VR4, "NBRE_Z"=>$VR5, "DIA_1"=>$VR6, "LONGUEUR_1"=>$VR7, "DIA_2"=>$VR8, "DIA_3"=>$VR9, "LONG_UTILE"=>$VR10, "LONG_TOTALE"=>$VR11, "CARACT_1"=>$VR12, "CARACT_2"=>$VR13, "FOURNISSEUR"=>$VR14, "REF_FOURNISSEUR"=>$VR15, "PRIX"=>$VR16, "QTE_MINI"=>$VR17, "CAS_EMPLOI_1"=>$VR18, "CAS_EMPLOI_2"=>$VR19, "CAS_EMPLOI_3"=>$VR20, "CAS_EMPLOI_4"=>$VR21, "CAS_EMPLOI_5"=>$VR22, "CAS_EMPLOI_6"=>$VR23 ); $concat = "" ; $datas = array(); foreach($VR as $VRn => $VRn_value){ if($VRn_value !== ""){ $concat = $concat. " AND ".$VRn. " = :" .$VRn ; $datas[":" .$VRn] = $VRn_value; }; }; $condition = ltrim($concat,"AND"); //--------------------------------------------------------------------------// // REQUETE //--------------------------------------------------------------------------// $sql = 'SELECT id FROM cutting_tools_01 '; $sql .= !empty($condition)? ' WHERE' . $condition : ""; try{ $requete = $connexion->prepare($sql); $requete->execute($datas); $resultat = $requete->fetchAll(PDO::FETCH_ASSOC); }catch(PDOException $e){ echo 'ECHEC : ' .$e->getMessage(); } //--------------------------------------------------------------------------// //on renvoi la réponse au script ajax au format json //--------------------------------------------------------------------------// echo json_encode(array('result'=>$resultat,'sql'=>$sql,'datas'=>$datas);
Voici un début de correction
Il reste un souci avec la variable $connexion .....
peux tu nous montrer le code de ton fichier cnxbdd.php ?
c'est $connexion qui s'y trouve pour la connexion à ta bdd ... ou bien $bdd ?
<?php header("Content-Type: application/json; charset=UTF-8"); error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE); //$_POST = json_decode($_POST["x"], false); // c'est quoi t'est-ce pourquoi pour ????!!! //--------------------------------------------------------------------------// // fonctions diverses... //--------------------------------------------------------------------------// function cleanDataPOST($dataToClean=NULL,$defaultValue=""){ $result = !empty($_POST[$dataToClean]) ? trim($_POST[$dataToClean]) : $defaultValue; $result = stripslashes($result); return $result; } //--------------------------------------------------------------------------// //connexion à la bdd //--------------------------------------------------------------------------// require_once "cnxbdd.php"; //--------------------------------------------------------------------------// // Variables .. //--------------------------------------------------------------------------// $VR = array(); $resultat = array(); $VR0 = cleanDataPOST("id"); $VR1 = cleanDataPOST("RefMag"); $VR2 = cleanDataPOST("familleOutil"); $VR3 = cleanDataPOST("SousFamille"); $VR4 = cleanDataPOST("Matiere"); $VR5 = cleanDataPOST("NbreZ"); $VR6 = cleanDataPOST("Dia1"); $VR7 = cleanDataPOST("Long1"); $VR8 = cleanDataPOST("Dia2"); $VR9 = cleanDataPOST("Dia3"); $VR10 = cleanDataPOST("LongUtile"); $VR11 = cleanDataPOST("LongTotale"); $VR12 = cleanDataPOST("Caract1"); $VR13 = cleanDataPOST("Caract2"); $VR14 = cleanDataPOST("Fournisseur"); $VR15 = cleanDataPOST("Ref_Fournisseur"); $VR16 = cleanDataPOST("Prix"); $VR17 = cleanDataPOST("QteMini"); $VR18 = cleanDataPOST("CasEmploi1"); $VR19 = cleanDataPOST("CasEmploi2"); $VR20 = cleanDataPOST("CasEmploi3"); $VR21 = cleanDataPOST("CasEmploi4"); $VR22 = cleanDataPOST("CasEmploi5"); $VR23 = cleanDataPOST("CasEmploi6"); // colonne de la table $VR = array ("id"=>$VR0, "REF_MAG"=>$VR1, "FAMILLE_OUTIL"=>$VR2, "SOUS_FAMILLE"=>$VR3, "MATIERE_OUTIL"=>$VR4, "NBRE_Z"=>$VR5, "DIA_1"=>$VR6, "LONGUEUR_1"=>$VR7, "DIA_2"=>$VR8, "DIA_3"=>$VR9, "LONG_UTILE"=>$VR10, "LONG_TOTALE"=>$VR11, "CARACT_1"=>$VR12, "CARACT_2"=>$VR13, "FOURNISSEUR"=>$VR14, "REF_FOURNISSEUR"=>$VR15, "PRIX"=>$VR16, "QTE_MINI"=>$VR17, "CAS_EMPLOI_1"=>$VR18, "CAS_EMPLOI_2"=>$VR19, "CAS_EMPLOI_3"=>$VR20, "CAS_EMPLOI_4"=>$VR21, "CAS_EMPLOI_5"=>$VR22, "CAS_EMPLOI_6"=>$VR23 ); $concat = "" ; $datas = array(); foreach($VR as $VRn => $VRn_value){ if($VRn_value !== ""){ $concat = $concat. " AND ".$VRn. " = :" .$VRn ; $datas[":" .$VRn] = $VRn_value; }; }; $condition = ltrim($concat,"AND"); //--------------------------------------------------------------------------// // REQUETE //--------------------------------------------------------------------------// $sql = 'SELECT id FROM cutting_tools_01 '; $sql .= !empty($condition)? ' WHERE' . $condition : ""; try{ $requete = $connexion->prepare($sql); // A corriger en fonction du contenu de ton fichier cnxbdd.php $requete->execute($datas); $resultat = $requete->fetchAll(PDO::FETCH_ASSOC); }catch(PDOException $e){ echo 'ECHEC : ' .$e->getMessage(); } //--------------------------------------------------------------------------// //on renvoi la réponse au script ajax au format json //--------------------------------------------------------------------------// echo json_encode(array('result'=>$resultat,'sql'=>$sql,'datas'=>$datas);
Il reste un souci avec la variable $connexion .....
peux tu nous montrer le code de ton fichier cnxbdd.php ?
c'est $connexion qui s'y trouve pour la connexion à ta bdd ... ou bien $bdd ?
En même temps... tu ne lui donne aucune variable à envoyer...
En général, on fait ça dans le .send
mais là.. ça n'a plus de rapport avec le forum PHP....
Je te laisse modifier ton code pour lui passer les paramètres que tu veux et si tu bloques, ouvres une nouvelle discussion dans le forum Javascript (en montrant ton code).
Et pense à mettre cette discussion en résolue.
En général, on fait ça dans le .send
xmlhttp.send("foo=bar&lorem=ipsum");
mais là.. ça n'a plus de rapport avec le forum PHP....
Je te laisse modifier ton code pour lui passer les paramètres que tu veux et si tu bloques, ouvres une nouvelle discussion dans le forum Javascript (en montrant ton code).
Et pense à mettre cette discussion en résolue.
Il n'y a pas de variable $_POST du formulaire... puisque tu ne le submit pas ...
Il faut que tu récupères chaque variable en Javascript
par exemple, pour le casEmploi4
et donc, pour l'envoyer dans ton send
Il faut que tu récupères chaque variable en Javascript
par exemple, pour le casEmploi4
var idInputCasEmploi4R = document.getElementById('idInputCasEmploi4R').value;
et donc, pour l'envoyer dans ton send
xmlhttp.send("CasEmploi4=idInputCasEmploi4R ");
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
Bonsoir Jordane,
Je te renvoie mon code en 4 parties(4 fichiers) avec une meilleure présentation. Je n'avais pas compris comment le poster.
Sauf erreur la detection des erreurs est activé.
Je ne vois pas de message d'alarme dans ma console...
Merci d'avance.
Je te renvoie mon code en 4 parties(4 fichiers) avec une meilleure présentation. Je n'avais pas compris comment le poster.
Sauf erreur la detection des erreurs est activé.
Je ne vois pas de message d'alarme dans ma console...
Merci d'avance.
<!DOCTYPE HTML> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <link rel="stylesheet" href="STYLE.css"/> <title>OUTILS COUPANTS HYDRO CHATEAUROUX</title> </head> <body> <?php include 'entete.php'; ?> <?php include 'creation.php'; ?> <?php include 'recherche.php'; ?> <!-- ******************************************************** --> <!-- ******************************************************** --> <!-- ***** AFFICHAGE DE LA TABLE OUTIL COMPLETE ****** --> <!-- ******************************************************** --> <!-- ******************************************************** --> <?php $serveur = "localhost"; $login = "root"; $pass = ""; try{ $connexion = new PDO("mysql:host=$serveur;dbname=hydro", $login, $pass); $connexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $requete = $connexion->prepare(" SELECT*FROM cutting_tools_01"); $requete->execute(); // sans affichage $resultat = $requete->fetchAll(); } catch(PDOException $e){ echo 'Echec : ' .$e->getMessage(); } ?> <table id='table_outils'> <thead> <tr> <th>N° ordre</th> <th>Réference magasin</th> <th>Famille</th> <th>Sous-famille</th> <th>Matière</th> <th>Nombre de dents</th> <th>Ø1</th> <th>Longueur 1</th> <th>Ø2</th> <th>Ø3</th> <th>Longueur taillée</th> <th>Longueur totale</th> <th>Caractéristique 1</th> <th>Caractéristique 2</th> <th>Fournisseur</th> <th>Référence fournisseur</th> <th>Prix</th> <th>Quantité à stocker</th> <th>Cas emploi 1</th> <th>Cas emploi 2</th> <th>Cas emploi 3</th> <th>Cas emploi 4</th> <th>Cas emploi 5</th> <th>Cas emploi 6</th> </tr> </thead> <tbody> <?php foreach($resultat as $row){ ?> <tr class = "tableRow" id = '<?php echo $row['id']?>'> <td><a href="DOCUMENTS_OUTILS/<?php echo $row['id']?>" target="_blank"><?php echo $row['id'];?></a></td> <td><?php echo $row['REF_MAG'];?></td> <td><?php echo $row['FAMILLE_OUTIL'];?></td> <td><?php echo $row['SOUS_FAMILLE'];?></td> <td><?php echo $row['MATIERE_OUTIL'];?></td> <td><?php echo $row['NBRE_Z'];?></td> <td><?php echo $row['DIA_1'];?></td> <td><?php echo $row['LONGUEUR_1'];?></td> <td><?php echo $row['DIA_2'];?></td> <td><?php echo $row['DIA_3'];?></td> <td><?php echo $row['LONG_UTILE'];?></td> <td><?php echo $row['LONG_TOTALE'];?></td> <td><?php echo $row['CARACT_1'];?></td> <td><?php echo $row['CARACT_2'];?></td> <td><?php echo $row['FOURNISSEUR'];?></td> <td><?php echo $row['REF_FOURNISSEUR'];?></td> <td><?php echo $row['PRIX'];?></td> <td><?php echo $row['QTE_MINI'];?></td> <td><?php echo $row['CAS_EMPLOI_1'];?></td> <td><?php echo $row['CAS_EMPLOI_2'];?></td> <td><?php echo $row['CAS_EMPLOI_3'];?></td> <td><?php echo $row['CAS_EMPLOI_4'];?></td> <td><?php echo $row['CAS_EMPLOI_5'];?></td> <td><?php echo $row['CAS_EMPLOI_6'];?></td> </tr> <?php } $connexion = null; ?> </tbody> <tfoot> <tr> <td colspan='2'>Nombre de references</td> <td>valeur</td> </tr> </tfoot> </table> <!-- ***************** PIED DE PAGE ******************** --> <?php include 'footer.php'; ?> <!-- ******************************************************** --> <!-- ***** SCRIPTS ****** --> <!-- ******************************************************** --> <script id='scpript_JS' src = "GESTION_OUTILS.js" > </script> </body> </html>
<!-- ************************************************************ --> <!-- RECHERCHER: FORMULAIRE RECHERCHER UNE REFERENCE DANS LA LISTE --> <!-- ************************************************************ --> <!-- ****** FORMULAIRE RECHERCHER ****** --> <form id='idFormRechercher' action="" method="post"> <div class = legendeR > <p id = 'legendeR1'>Renseigner les champs pour le tri</p> </div> <div class='classFRechercher' id='idDIVFrechercher'> <div class='classFRechercher_P1'> <!-- ****** CHOIX FAMILLE ****** --> <div class='classChoixFamilleR'> <label id='idLblCFamilleR' For="idSlctCFamilleR">FAMILLE OUTIL</label> <select id="idSlctCFamilleR" name = "familleOutil" autofocus > <option value="">--CHOISIR UNE OPTION--</option> <option value="FRAISE">FRAISE</option> <option value="FORET">FORET</option> <option value="TARAUD">TARAUD</option> </select> </div> <!-- ****** CHOIX SOUS FAMILLE ****** --> <div class='classChoix_S_FamilleR'> <label id='idLblC_S_FamilleR' For="idSlctC_S_FamilleR">SOUS FAMILLE</label> <select id="idSlctC_S_FamilleR" name="SousFamille" > <optgroup label=""> <option value="">--CHOISIR UNE OPTION--</option> </optgroup> <optgroup label="FRAISE"> <option value="2_TAILLES">2 TAILLES</option> <option value="TORIQUE">TORIQUE</option> <option value="A_FILETER">A FILETER</option> <option value="3_TAILLES">3 TAILLES</option> </optgroup> <optgroup label="FORET"> <option value="STANDARD">STANDARD</option> <option value="ETAGE">ETAGE</option> <option value="A_POINTER">A POINTER</option> <option value="SPECIAL">SPECIAL</option> </optgroup> <optgroup label="TARAUD"> <option value="COUPANT">COUPANT</option> <option value="DEFORMATION">DEFORMATION</option> </optgroup> </select> </div> <!-- ****** CHOIX MATIERE ****** --> <div class='classChoixMatiereR'> <label id='idLblCMatiereR' For="idSlctCMatiereR">MATIERE OUTIL</label> <select id="idSlctCMatiereR" name = "Matiere" > <option value="">--CHOISIR UNE OPTION--</option> <option value="CARBURE">CARBURE</option> <option value="ACIER_RAPIDE">ACIER RAPIDE</option> </select> </div> <!-- ****** NOMBRE DE DENTS OUTIL ****** --> <div class="classNbreZR"> <label id='idLblCNbreZR' For='idInputNbreZR'>NOMBRE DE DENTS OUTIL</label> <input id = "idInputNbreZR" name = "NbreZ" type = "number" min = "0" max = "4" placeholder = 'NOMBRE DE DENTS'> </div> <!-- ****** DIAMETRE 1 ****** --> <div class="classDia1R"> <label id='idLblCDia1R' For='idInputDia1R'>DIAMETRE 1</label> <input id = "idInputDia1R" name = "Dia1" type = "text" min = "0" max = "500" step = "0.01" placeholder = ' 1 ER DIAMETRE'> </div> <!-- ****** LONGUEUR 1 ****** --> <div class="classLong1R"> <label id='idLblCLong1R' For='idInputLong1R'>LONGUEUR 1</label> <input id = "idInputLong1R" name = "Long1" type = "number" min = "0" max = "200" step = "0.1" placeholder = 'LONGUEUR 1er DIAMETRE'> </div> <!-- ****** DIAMETRE 2 ****** --> <div class="classDia2R"> <label id='idLblCDia2R' For='idInputDia2R'>DIAMETRE 2</label> <input id = "idInputDia2R" name = "Dia2" min = "0" max = "500" type = "text" pattern="[0-9]{1,3}" step = "0.01" placeholder = ' 2 EME DIAMETRE'> </div> <!-- ****** DIAMETRE 3 ****** --> <div class="classDia3R"> <label id='idLblCDia3R' For='idInputDia3R'>DIAMETRE 3</label> <input id = "idInputDia3R" name = "Dia3" type = "text" min = "0" max = "500" step = "0.01" pattern="[0-9]{1,3}" placeholder = ' 3 EME DIAMETRE'> </div> <!-- ****** LONGUEUR UTILE ****** --> <div class="classLongUtileR"> <label id='idLblCLongUtileR' For='idInputLongUtileR'>LONGUEUR UTILE</label> <input id = "idInputLongUtileR" name = "LongUtile" type = "number" min = "0" max = "200" step = "1" placeholder = 'LONGUEUR UTILE'> </div> <!-- ****** LONGUEUR TOTALE ****** --> <div class="classLongTotaleR"> <label id='idLblCLongTotaleR' For='idInputLongTotaleR'>LONGUEUR TOTALE</label> <input id = "idInputLongTotaleR" name = "LongTotale" type = "number" min = "0" max = "250" step = "1" placeholder = 'LONGUEUR TOTALE'> </div> <!-- ****** CARACTERISTIQUE 1 ****** --> <div class="classCaract1R"> <label id='idLblCCaract1R' For='idInputCaract1R'>CARASTERISTIQUE 1</label> <input id = "idInputCaract1R" name = "Caract1" pattern="[a-zA-Z0-9-\s\.]{0,20}" list = "idDataListCaract1" placeholder = 'CARACTERISTIQUE 1'> </div> </div> <div class='classFRechercher_P2'> <!-- ****** FOURNISSEUR ****** --> <div class="classFournisseurR"> <label id='idLblCFournisseurR' For='idInputFournisseurR'>FOURNISSEUR</label> <input id = "idInputFournisseurR" name = "Fournisseur" pattern="[a-zA-Z0-9-\s]{0,12}" list = "idDataListFournisseur" placeholder = 'FOURNISSEUR'> </div> <!-- ****** REFERENCE FOURNISSEUR ****** --> <div class="classRef_FournisseurR"> <label id='idLblCRef_FournisseurR' For='idInputRef_FournisseurR'>REFERENCE FOURNISSEUR</label> <input id = "idInputRef_FournisseurR" name = "Ref_Fournisseur" pattern="[a-zA-Z0-9-\s\.]{0,15}" placeholder = 'REFERENCE FOURNISSEUR'> </div> <!-- ****** PRIX ET QUANTITE MINI ****** --> <div class="classPrixR"> <label id='idLblCPrix_QteMiniR' For='idInputPrixR'>PRIX & QUANTITE MINI</label> <input id = "idInputPrixR" name = "Prix" type = "number" min = "0" placeholder = 'Prix HT'> <input id = "idInputQteMiniR" name = "QteMini" type = "number" min = "0" step = "1" > </div> </div> <div class='classFRechercher_P3'> <!-- ****** CAS D'EMPLOI 1 ****** --> <div class="classCasEmploiR"> <label id='idLblCCasEmploi1R' For='idInputCasEmploi1R'>CAS D'EMPLOI 1</label> <input id = "idInputCasEmploi1R" name = "CasEmploi1" pattern="[A-Z0-9\s]{0,20}" placeholder = 'CAS EMPLOI 1'> </div> <!-- ****** CAS D'EMPLOI 2 ****** --> <div class="classCasEmploiR"> <label id='idLblCCasEmploi2R' For='idInputCasEmploi2R'>CAS D'EMPLOI 2</label> <input id = "idInputCasEmploi2R" name = "CasEmploi2" pattern="[A-Z0-9\s]{0,20}" placeholder = 'CAS EMPLOI 2'> </div> <!-- ****** CAS D'EMPLOI 3 ****** --> <div class="classCasEmploiR"> <label id='idLblCCasEmploi3R' For='idInputCasEmploi3R'>CAS D'EMPLOI 3</label> <input id = "idInputCasEmploi3R" name = "CasEmploi3" pattern="[A-Z0-9\s]{0,20}" placeholder = 'CAS EMPLOI 3'> </div> <!-- ****** CAS D'EMPLOI 4 ****** --> <div class="classCasEmploiR"> <label id='idLblCCasEmploi4R' For='idInputCasEmploi4R'>CAS D'EMPLOI 4</label> <input id = "idInputCasEmploi4R" name = "CasEmploi4" pattern="[A-Z0-9\s]{0,20}" placeholder = 'CAS EMPLOI 4'> </div> <!-- ****** CAS D'EMPLOI 5 ****** --> <div class="classCasEmploiR"> <label id='idLblCCasEmploi5R' For='idInputCasEmploi5R'>CAS D'EMPLOI 5</label> <input id = "idInputCasEmploi5R" name = "CasEmploi5" pattern="[A-Z0-9\s]{0,20}" placeholder = 'CAS EMPLOI 5'> </div> <!-- ****** CAS D'EMPLOI 6 ****** --> <div class="classCasEmploiR"> <label id='idLblCCasEmploi6R' For='idInputCasEmploi6R'>CAS D'EMPLOI 6</label> <input id = "idInputCasEmploi6R" name = "CasEmploi6" pattern="[A-Z0-9\s]{0,20}" placeholder = 'CAS EMPLOI 6'> </div> </div> <!-- ****** BOUTONS RECHERCHE ****** --> <div class = "boutonsRecherche"> <!-- ****** BOUTON VALIDER RECHERCHE ****** --> <input id = "idboutonValiderRecherche" class = 'classboutonValiderRecherche' type = "submit" value = "VALIDER"> <!-- ****** BOUTON RESET DE RECHERCHE ****** --> <input id = "idboutonResetRecherche" class = 'classboutonResetRecherche' type = "reset" value = "RESET"> <!-- ****** BOUTON FERMER RECHERCHE ****** --> <input id = "idboutonFermerRecherche" class = 'classboutonFermerRecherche' type = "reset" value = "FERMER"> </div> </div> </form>
// TRI DU TABLEAU PAR CLICK SUR UNE ENTETE DE COLONNE // Sources: https://www.pierre-giraud.com/trier-tableau-javascript/ // FONCTION DE TRIAGE DES LIGNES const compare = (ids, asc) => (row1, row2) => { const tdValue = (row, ids) => row.children[ids].textContent; const tri = (v1, v2) => v1 !== '' && v2 !== '' && !isNaN(v1) && !isNaN(v2) ? v1 - v2 : v1.toString().localeCompare(v2); return tri(tdValue(asc ? row1 : row2, ids), tdValue(asc ? row2 : row1, ids)); }; // RECUPERATION DES VALEURS DU TABLEAU D'OUTILS const table_outils_originale = document.querySelector('tbody'); const entetes_colonnes_tableau = document.querySelectorAll('th'); const lignes_tableau = table_outils_originale.querySelectorAll('tr'); // ECOUTE DU CLICK SUR ENTETE DE COLONNE POUR TRI DU TABLEAU // ci-dessous, th est une variable qui aurait pu être nommée differement. entetes_colonnes_tableau.forEach(th => th.addEventListener('click', () => { let classe = Array.from(lignes_tableau).sort(compare(Array.from(entetes_colonnes_tableau).indexOf(th), this.asc = !this.asc)); classe.forEach(tr => table_outils_originale.appendChild(tr)); })); //---------*************----------************------------- // BOUTON CREER // //---------*************----------************------------- function fCreation(){ let page = document.body ; let formCreation = document.getElementById('idFormCreer') ; let formCreationDiv = document.getElementById('idDIVFCreer') ; formCreation.style.display = 'block' ; // NEUTRALISER LES 4 BOUTONS : CREER, RECHERCHER, MODIFIER, RESET. creation.removeEventListener('click',fCreation) ; recherche.removeEventListener('click',fRecherche) ; modification.removeEventListener('click',fModification) ; raz.removeEventListener('click',fReset) ; // BOUTON FERMER CREATION let boutonFermerCreation = document.getElementById('idboutonFermerCreation'); boutonFermerCreation.addEventListener('click',fermerCreation ) ; // FONCTION DU BOUTON FERMER DU FORMULAIRE CREER function fermerCreation (){ creation.addEventListener('click',fCreation) ; recherche.addEventListener('click',fRecherche) ; modification.addEventListener('click',fModification) ; raz.addEventListener('click',fReset) ; formCreation.style.display = 'none' } } //ECOUTE DU CLICK SUR BOUTON CREER let creation = document.getElementById('creer') ; creation.addEventListener('click',fCreation) ; //---------*************----------************------------- // BOUTON RECHERCHER // //---------*************----------************------------- function fRecherche(){ let page = document.body ; let formRecherche = document.getElementById('idFormRechercher') ; let formRechercheDiv = document.getElementById('idDIVFrechercher') ; formRecherche.style.display = 'block' ; // NEUTRALISER LES 4 BOUTONS : CREER, RECHERCHER, MODIFIER, RESET. creation.removeEventListener('click',fCreation) ; recherche.removeEventListener('click',fRecherche) ; modification.removeEventListener('click',fModification) ; raz.removeEventListener('click',fReset) ; //BOUTON FERMER RECHERCHE let boutonFermerRecherche = document.getElementById('idboutonFermerRecherche'); boutonFermerRecherche.addEventListener('click',fermerRecherche ) ; // FONCTION DU BOUTON FERMER DU FORMULAIRE RECHERCHE // Revalider les quatres boutons de l'entete - voir à utiliser attribut onclick de form function fermerRecherche (){ creation.addEventListener('click',fCreation) ; recherche.addEventListener('click',fRecherche) ; modification.addEventListener('click',fModification) ; raz.addEventListener('click',fReset) ; formRecherche.style.display = 'none'; } //BOUTON VALIDER RECHERCHE // reference www.w3schools.com -> JAVA SCRIPT / JSON PHP let boutonValiderRecherche = document.getElementById('idboutonValiderRecherche'); boutonValiderRecherche.addEventListener('click',validerRecherche) ; function validerRecherche(){ var xmlhttp ="", resultRecherche = "", x ="", idRow ="" ; xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { resultRecherche = JSON.parse(this.responseText); for (x in resultRecherche) { idRow = document.getElementById('x'); idRow.style.display = 'none'; } } }; xmlhttp.open("POST", "trouver.php", true); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.send(); } }//fermeture fRecherche-finale //ECOUTE DU CLICK SUR BOUTON RECHERCHE let recherche = document.getElementById('chercher') ; recherche.addEventListener('click',fRecherche) ; //---------*************----------************------------- // BOUTON MODIFIER // //---------*************----------************------------- function fModification(){ document.getElementById('table_outils').style.marginTop = '75px' ; alert('Modifier une référence!!') ; } //ECOUTE DU CLICK SUR BOUTON MODIFIER let modification = document.getElementById('modifier') ; modification.addEventListener('click',fModification) ; // BOUTON RESET function fReset(){ alert('Reset tableau outils!!') ; } //ECOUTE DU CLICK SUR BOUTON RESET let raz = document.getElementById('reset') ; raz.addEventListener('click',fReset) ;
<?php error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE); header("Content-Type: application/json; charset=UTF-8"); $_POST = json_decode($_POST["x"], false); $VR = []; $VR0=$VR1=$VR2=$VR3=$VR4=$VR5=$VR6=$VR7=$VR8=$VR9=$VR10=$VR11=$VR12= $VR13=$VR14=$VR15=$VR16=$VR17=$VR18=$VR19=$VR20=$VR21=$VR22=$VR23=""; $_POST["id"]=""; // à enlever lors des implementations dans recherche.php $_POST["RefMag"]=""; // à enlever $_POST["Caract2"]="";// à enlever function cleanData($dataToClean){ $dataToClean = trim($dataToClean); $dataToClean = stripslashes($dataToClean); $dataCleaned = htmlspecialchars($dataToClean); return $dataCleaned; } $VR0 = cleanData($_POST["id"]); $VR1 = cleanData($_POST["RefMag"]); $VR2 = cleanData($_POST["familleOutil"]); $VR3 = cleanData($_POST["SousFamille"]); $VR4 = cleanData($_POST["Matiere"]); $VR5 = cleanData($_POST["NbreZ"]); $VR6 = cleanData($_POST["Dia1"]); $VR7 = cleanData($_POST["Long1"]); $VR8 = cleanData($_POST["Dia2"]); $VR9 = cleanData($_POST["Dia3"]); $VR10 = cleanData($_POST["LongUtile"]); $VR11 = cleanData($_POST["LongTotale"]); $VR12 = cleanData($_POST["Caract1"]); $VR13 = cleanData($_POST["Caract2"]); $VR14 = cleanData($_POST["Fournisseur"]); $VR15 = cleanData($_POST["Ref_Fournisseur"]); $VR16 = cleanData($_POST["Prix"]); $VR17 = cleanData($_POST["QteMini"]); $VR18 = cleanData($_POST["CasEmploi1"]); $VR19 = cleanData($_POST["CasEmploi2"]); $VR20 = cleanData($_POST["CasEmploi3"]); $VR21 = cleanData($_POST["CasEmploi4"]); $VR22 = cleanData($_POST["CasEmploi5"]); $VR23 = cleanData($_POST["CasEmploi6"]); // colonne de la table $VR = array ("id"=>"$VR0", "REF_MAG"=>"$VR1", "FAMILLE_OUTIL"=>"$VR2", "SOUS_FAMILLE"=>"$VR3", "MATIERE_OUTIL"=>"$VR4", "NBRE_Z"=>"$VR5", "DIA_1"=>"$VR6", "LONGUEUR_1"=>"$VR7", "DIA_2"=>"$VR8", "DIA_3"=>"$VR9", "LONG_UTILE"=>"$VR10", "LONG_TOTALE"=>"$VR11", "CARACT_1"=>"$VR12", "CARACT_2"=>"$VR13", "FOURNISSEUR"=>"$VR14", "REF_FOURNISSEUR"=>"$VR15", "PRIX"=>"$VR16", "QTE_MINI"=>"$VR17", "CAS_EMPLOI_1"=>"$VR18", "CAS_EMPLOI_2"=>"$VR19", "CAS_EMPLOI_3"=>"$VR20", "CAS_EMPLOI_4"=>"$VR21", "CAS_EMPLOI_5"=>"$VR22", "CAS_EMPLOI_6"=>"$VR23"); $concat = "" ; foreach($VR as $VRn => $VRn_value){ if($VRn_value !== ""){ $concat = $concat. 'AND '.$VRn.' = \''.$VRn_value.'\' '; }; }; $condition = ltrim($concat,"AND"); // echo 'Concat = ' .$concat; //echo ' et Condition = '.$condition; /* *************************************************** */ /* REQUETE */ /* *************************************************** */ require_once "cnxbdd.php"; try{ $connexion = new PDO("mysql:host=$serveur;dbname=hydro", $login, $pass); $connexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $requete = $connexion->query('SELECT id FROM cutting_tools_01 WHERE' . $condition ); $resultat = $requete->fetchAll(PDO::FETCH_ASSOC); print_r ($resultat); } catch(PDOException $e){ echo 'ECHEC : ' .$e->getMessage(); }
Dans la console... tu devrais au moins voir l'appel de ton script ajax.
Histoire de bien le voir et de le debuguer facilement, je t'invite fortement à utiliser le navigateur FireFox.
Tu pourras ainsi voir la ligne d'appel, la déplier et voir la réponse.
Comme sur cette image d'exemple :

Pense bien à vérifier que l'option "xhr" est activée.. sinon tu ne verras rien
Histoire de bien le voir et de le debuguer facilement, je t'invite fortement à utiliser le navigateur FireFox.
Tu pourras ainsi voir la ligne d'appel, la déplier et voir la réponse.
Comme sur cette image d'exemple :

Pense bien à vérifier que l'option "xhr" est activée.. sinon tu ne verras rien
Bonjour Jordan 45 ,
Merci pour ce tuyau, et en effet, je vois une erreur 404, mais je ne comprends pas pourquoi il me met ça.
http://hydro/favicon.ico - qu'est-ce que c'est que ce favicon.ico?
Merci de ton retour.
Merci pour ce tuyau, et en effet, je vois une erreur 404, mais je ne comprends pas pourquoi il me met ça.
http://hydro/favicon.ico - qu'est-ce que c'est que ce favicon.ico?
Merci de ton retour.
Ca... ca n'a aucun rapport avec ton souci.
Et ce n'est pas la ligne correspondant à ton appel ajax....
Modifie ton JS comme ceci
et regarde ce que ça t'affiche dans la console lorsque tu cliques sur ton bouton.
N'hésites pas à nous en faire une capture écran...
Et ce n'est pas la ligne correspondant à ton appel ajax....
Modifie ton JS comme ceci
let boutonValiderRecherche = document.getElementById('idboutonValiderRecherche'); boutonValiderRecherche.addEventListener('click',validerRecherche) ; function validerRecherche(){ console.log("On entre dans la fonction validerRecherche"); var xmlhttp ="", resultRecherche = "", x ="", idRow ="" ; xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { console.log("Success",xmlhttp); resultRecherche = JSON.parse(this.responseText); for (x in resultRecherche) { idRow = document.getElementById('x'); idRow.style.display = 'none'; } } else { console.log(xmlhttp, xmlhttp.status); } }; xmlhttp.open("POST", "trouver.php", true); xmlhttp.onerror = function () { console.log(xmlhttp, xmlhttp.status); alert("Erreur ajax : Regarder la console pour plus de détails !"); }; xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.send(); }
et regarde ce que ça t'affiche dans la console lorsque tu cliques sur ton bouton.
N'hésites pas à nous en faire une capture écran...
Salut Jordan45;
J'ai essayé ton code, toujours pas de réaction au niveau du navigateur.
Je joint ma capture écran de la console , ma je n' arrive pas à afficher les onglets paramètres et réponses comme sur la tienne. Comment fais tu?

J'ai aussi fait une modif dans ton retour de PHP sur le nom de la variable à retourner.
J'ai essayé ton code, toujours pas de réaction au niveau du navigateur.
Je joint ma capture écran de la console , ma je n' arrive pas à afficher les onglets paramètres et réponses comme sur la tienne. Comment fais tu?

J'ai aussi fait une modif dans ton retour de PHP sur le nom de la variable à retourner.
function cleanData($dataToClean=NULL){ $dataToClean = !empty($dataToClean) ? trim($dataToClean) : ""; $dataToClean = stripslashes($dataToClean); //$dataCleaned = htmlspecialchars($dataToClean);// Jamais pour le traitement en BDD.. seulement à l'affichage ! return $dataToclean; }
Bien sur, je vous renvoie tout le projet:
Hydro_01.php
creation.php
creer.php
recherche.php
trouver.php
GESTION_OUTILS.js
entete.php
style.css
Hydro_01.php
<!DOCTYPE HTML> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <link rel="stylesheet" href="STYLE.css"/> <title>OUTILS COUPANTS HYDRO CHATEAUROUX</title> </head> <body> <?php include 'entete.php'; ?> <?php include 'creation.php'; ?> <?php include 'recherche.php'; ?> <!-- ******************************************************** --> <!-- ******************************************************** --> <!-- ***** AFFICHAGE DE LA TABLE OUTIL COMPLETE ****** --> <!-- ******************************************************** --> <!-- ******************************************************** --> <?php $serveur = "localhost"; $login = "root"; $pass = ""; try{ $connexion = new PDO("mysql:host=$serveur;dbname=hydro", $login, $pass); $connexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $requete = $connexion->prepare(" SELECT*FROM cutting_tools_01"); $requete->execute(); // sans affichage $resultat = $requete->fetchAll(); } catch(PDOException $e){ echo 'Echec : ' .$e->getMessage(); } ?> <table id='table_outils'> <thead> <tr> <th>N° ordre</th> <th>Réference magasin</th> <th>Famille</th> <th>Sous-famille</th> <th>Matière</th> <th>Nombre de dents</th> <th>Ø1</th> <th>Longueur 1</th> <th>Ø2</th> <th>Ø3</th> <th>Longueur taillée</th> <th>Longueur totale</th> <th>Caractéristique 1</th> <th>Caractéristique 2</th> <th>Fournisseur</th> <th>Référence fournisseur</th> <th>Prix</th> <th>Quantité à stocker</th> <th>Cas emploi 1</th> <th>Cas emploi 2</th> <th>Cas emploi 3</th> <th>Cas emploi 4</th> <th>Cas emploi 5</th> <th>Cas emploi 6</th> </tr> </thead> <tbody> <?php foreach($resultat as $row){ ?> <tr class = "tableRow" id = '<?php echo $row['id']?>'> <td><a href="DOCUMENTS_OUTILS/<?php echo $row['id']?>" target="_blank"><?php echo $row['id'];?></a></td> <td><?php echo $row['REF_MAG'];?></td> <td><?php echo $row['FAMILLE_OUTIL'];?></td> <td><?php echo $row['SOUS_FAMILLE'];?></td> <td><?php echo $row['MATIERE_OUTIL'];?></td> <td><?php echo $row['NBRE_Z'];?></td> <td><?php echo $row['DIA_1'];?></td> <td><?php echo $row['LONGUEUR_1'];?></td> <td><?php echo $row['DIA_2'];?></td> <td><?php echo $row['DIA_3'];?></td> <td><?php echo $row['LONG_UTILE'];?></td> <td><?php echo $row['LONG_TOTALE'];?></td> <td><?php echo $row['CARACT_1'];?></td> <td><?php echo $row['CARACT_2'];?></td> <td><?php echo $row['FOURNISSEUR'];?></td> <td><?php echo $row['REF_FOURNISSEUR'];?></td> <td><?php echo $row['PRIX'];?></td> <td><?php echo $row['QTE_MINI'];?></td> <td><?php echo $row['CAS_EMPLOI_1'];?></td> <td><?php echo $row['CAS_EMPLOI_2'];?></td> <td><?php echo $row['CAS_EMPLOI_3'];?></td> <td><?php echo $row['CAS_EMPLOI_4'];?></td> <td><?php echo $row['CAS_EMPLOI_5'];?></td> <td><?php echo $row['CAS_EMPLOI_6'];?></td> </tr> <?php } $connexion = null; ?> </tbody> <tfoot> <tr> <td colspan='2'>Nombre de references</td> <td>valeur</td> </tr> </tfoot> </table> <!-- ***************** PIED DE PAGE ******************** --> <?php include 'footer.php'; ?> <!-- ******************************************************** --> <!-- ***** SCRIPTS ****** --> <!-- ******************************************************** --> <script id='scpript_JS' src = "GESTION_OUTILS.js" > </script> </body> </html>
creation.php
<!-- ********************************************************** --> <!-- CREER: FORMULAIRE CREER UNE NOUVELLE REFERENCE --> <!-- ********************************************************** --> <!-- ****** CREATION FORMULAIRE ****** --> <form id='idFormCreer' action="creer.php" method="post"> <div class = legende > <p id = 'legende1'>Renseigner les informations.</p> <p id = 'legende2'>Les informations ombrées sont obligatoires.</p> </div> <div class='classFCreer' id='idDIVFcreer'> <div class='classFCreer_P1'> <!-- ****** CHOIX FAMILLE ****** --> <div class='classChoixFamille'> <label id='idLblCFamille' For="idSlctCFamille">FAMILLE OUTIL</label> <select id="idSlctCFamille" name = "familleOutil" autofocus required> <option value="">--CHOISIR UNE OPTION--</option> <option value="FRAISE">FRAISE</option> <option value="FORET">FORET</option> <option value="TARAUD">TARAUD</option> </select> </div> <!-- ****** CHOIX SOUS FAMILLE ****** --> <div class='classChoix_S_Famille'> <label id='idLblC_S_Famille' For="idSlctC_S_Famille">SOUS FAMILLE</label> <select id="idSlctC_S_Famille" name="SousFamille" required > <optgroup label=""> <option value="init">--CHOISIR UNE OPTION--</option> </optgroup> <optgroup label="FRAISE"> <option value="2_TAILLES">2 TAILLES</option> <option value="TORIQUE">TORIQUE</option> <option value="A_FILETER">A FILETER</option> <option value="3_TAILLES">3 TAILLES</option> </optgroup> <optgroup label="FORET"> <option value="STANDARD">STANDARD</option> <option value="ETAGE">ETAGE</option> <option value="A_POINTER">A POINTER</option> <option value="SPECIAL">SPECIAL</option> </optgroup> <optgroup label="TARAUD"> <option value="COUPANT">COUPANT</option> <option value="DEFORMATION">DEFORMATION</option> </optgroup> </select> </div> <!-- ****** CHOIX MATIERE ****** --> <div class='classChoixMatiere'> <label id='idLblCMatiere' For="idSlctCMatiere">MATIERE OUTIL</label> <select id="idSlctCMatiere" name = "Matiere" required > <option value="">--CHOISIR UNE OPTION--</option> <option value="CARBURE">CARBURE</option> <option value="ACIER_RAPIDE">ACIER RAPIDE</option> </select> </div> <!-- ****** NOMBRE DE DENTS OUTIL ****** --> <div class="classNbreZ"> <label id='idLblCNbreZ' For='idInputNbreZ'>NOMBRE DE DENTS OUTIL</label> <input id = "idInputNbreZ" name = "NbreZ" required type = "number" min = "0" max = "4" placeholder = 'NOMBRE DE DENTS'> </div> <!-- ****** DIAMETRE 1 ****** --> <div class="classDia1"> <label id='idLblCDia1' For='idInputDia1'>DIAMETRE 1</label> <input id = "idInputDia1" name = "Dia1" type = "text" required min = "0" max = "500" step = "0.01" placeholder = ' 1 ER DIAMETRE'> </div> <!-- ****** LONGUEUR 1 ****** --> <div class="classLong1"> <label id='idLblCLong1' For='idInputLong1'>LONGUEUR 1</label> <input id = "idInputLong1" name = "Long1" type = "number" required min = "0" max = "200" step = "0.1" placeholder = 'LONGUEUR 1er DIAMETRE'> </div> <!-- ****** DIAMETRE 2 ****** --> <div class="classDia2"> <label id='idLblCDia2' For='idInputDia2'>DIAMETRE 2</label> <input id = "idInputDia2" name = "Dia2" min = "0" max = "500" type = "text" pattern="[0-9]{1,3}" step = "0.01" placeholder = ' 2 EME DIAMETRE'> </div> <!-- ****** DIAMETRE 3 ****** --> <div class="classDia3"> <label id='idLblCDia3' For='idInputDia3'>DIAMETRE 3</label> <input id = "idInputDia3" name = "Dia3" type = "text" min = "0" max = "500" step = "0.01" pattern="[0-9]{1,3}" placeholder = ' 3 EME DIAMETRE'> </div> <!-- ****** LONGUEUR UTILE ****** --> <div class="classLongUtile"> <label id='idLblCLongUtile' For='idInputLongUtile'>LONGUEUR UTILE</label> <input id = "idInputLongUtile" name = "LongUtile" type = "number" required min = "0" max = "200" step = "1" placeholder = 'LONGUEUR UTILE'> </div> <!-- ****** LONGUEUR TOTALE ****** --> <div class="classLongTotale"> <label id='idLblCLongTotale' For='idInputLongTotale'>LONGUEUR TOTALE</label> <input id = "idInputLongTotale" name = "LongTotale" type = "number" required min = "0" max = "250" step = "1" placeholder = 'LONGUEUR TOTALE'> </div> <!-- ****** CARACTERISTIQUE 1 ****** --> <div class="classCaract1"> <label id='idLblCCaract1' For='idInputCaract1'>CARASTERISTIQUE 1</label> <input id = "idInputCaract1" name = "Caract1" pattern="[a-zA-Z0-9-\s\.]{0,20}" list = "idDataListCaract1" placeholder = 'CARACTERISTIQUE 1'> </div> </div> <div class='classFCreer_P2'> <!-- ****** FOURNISSEUR ****** --> <div class="classFournisseur"> <label id='idLblCFournisseur' For='idInputFournisseur'>FOURNISSEUR</label> <input id = "idInputFournisseur" name = "Fournisseur" required pattern="[a-zA-Z0-9-\s]{0,12}" list = "idDataListFournisseur" placeholder = 'FOURNISSEUR'> </div> <!-- ****** REFERENCE FOURNISSEUR ****** --> <div class="classRef_Fournisseur"> <label id='idLblCRef_Fournisseur' For='idInputRef_Fournisseur'>REFERENCE FOURNISSEUR</label> <input id = "idInputRef_Fournisseur" name = "Ref_Fournisseur" required pattern="[a-zA-Z0-9-\s\.]{0,15}" placeholder = 'REFERENCE FOURNISSEUR'> </div> <!-- ****** PRIX ET QUANTITE MINI ****** --> <div class="classPrix"> <label id='idLblCPrix_QteMini' For='idInputPrix'>PRIX & QUANTITE MINI</label> <input id = "idInputPrix" name = "Prix" type = "number" required min = "0" placeholder = 'Prix HT'> <input id = "idInputQteMini" name = "QteMini" type = "number" min = "0" step = "1" required> </div> </div> <div class='classFCreer_P3'> <!-- ****** CAS D'EMPLOI 1 ****** --> <div class="classCasEmploi"> <label id='idLblCCasEmploi1' For='idInputCasEmploi1'>CAS D'EMPLOI 1</label> <input id = "idInputCasEmploi1" name = "CasEmploi1" pattern="[A-Z0-9\s]{0,20}" placeholder = 'CAS EMPLOI 1'> </div> <!-- ****** CAS D'EMPLOI 2 ****** --> <div class="classCasEmploi"> <label id='idLblCCasEmploi2' For='idInputCasEmploi2'>CAS D'EMPLOI 2</label> <input id = "idInputCasEmploi2" name = "CasEmploi2" pattern="[A-Z0-9\s]{0,20}" placeholder = 'CAS EMPLOI 2'> </div> <!-- ****** CAS D'EMPLOI 3 ****** --> <div class="classCasEmploi"> <label id='idLblCCasEmploi3' For='idInputCasEmploi3'>CAS D'EMPLOI 3</label> <input id = "idInputCasEmploi3" name = "CasEmploi3" pattern="[A-Z0-9\s]{0,20}" placeholder = 'CAS EMPLOI 3'> </div> <!-- ****** CAS D'EMPLOI 4 ****** --> <div class="classCasEmploi"> <label id='idLblCCasEmploi4' For='idInputCasEmploi4'>CAS D'EMPLOI 4</label> <input id = "idInputCasEmploi4" name = "CasEmploi4" pattern="[A-Z0-9\s]{0,20}" placeholder = 'CAS EMPLOI 4'> </div> <!-- ****** CAS D'EMPLOI 5 ****** --> <div class="classCasEmploi"> <label id='idLblCCasEmploi5' For='idInputCasEmploi5'>CAS D'EMPLOI 5</label> <input id = "idInputCasEmploi5" name = "CasEmploi5" pattern="[A-Z0-9\s]{0,20}" placeholder = 'CAS EMPLOI 5'> </div> <!-- ****** CAS D'EMPLOI 6 ****** --> <div class="classCasEmploi"> <label id='idLblCCasEmploi6' For='idInputCasEmploi6'>CAS D'EMPLOI 6</label> <input id = "idInputCasEmploi6" name = "CasEmploi6" pattern="[A-Z0-9\s]{0,20}" placeholder = 'CAS EMPLOI 6'> </div> </div> <!-- ****** BOUTONS CREATION ****** --> <div class = "boutonsCreation"> <!-- ****** BOUTON RESET DE CREER ****** --> <input id = "idboutonResetCreation" class = 'classboutonResetCreation' type = "reset" value = "RESET"> <!-- ****** BOUTON VALIDER CREATION ****** --> <input id = "idboutonValiderCreation" class = 'classboutonValiderCreation' type = "submit" value = "VALIDER"> <!-- ****** BOUTON FERMER CREATION ****** --> <input id = "idboutonFermerCreation" class = 'classboutonFermerCreation' type = "reset" value = "FERMER"> </div> </div> </form> <datalist id="idDataListCaract1"> <option value="HARD CARBON"> <option value="DM2380"> <option value="AFFUTAGE ANTI BAVURE"> <option value="AUTRE"> <option value="DIVERS"> </datalist> <datalist id="idDataListFournisseur"> <option value="CHASSET"> <option value="GUILMAN - SECO"> <option value="GUILMAN - LMT"> <option value="MECACOUPE"> <option value="DIVERS"> </datalist>
creer.php
<?php require_once "cnxbdd.php"; $V0=$V1=$V2=$V3=$V4=$V5=$V6=$V7=$V8=$V9=$V10=$V11=$V12= $V13=$V14=$V15=$V16=$V17=$V18=$V19=$V20=$V21=$V22=$V23=""; /* POSSIBILITE DE METTRE DES CONTROLES DE CONFORMITE COMPLEMENTAIRES AVEC UNE STRUCTURE " if (TRUE) ELSE() - A VOIR..." //$_POST["refMag"] = filter_var($_POST["refMag"], FILTER_SANITIZE_STRING); $_POST["familleOutil"] = filter_var($_POST["familleOutil"], FILTER_SANITIZE_STRING); $_POST["SousFamille"] = filter_var($_POST["SousFamille"], FILTER_SANITIZE_STRING); $_POST["Matiere"] = filter_var($_POST["Matiere"], FILTER_SANITIZE_STRING); //$_POST["refMag"] = filter_var($_POST["refMag"], FILTER_SANITIZE_STRING); //$_POST["refMag"] = filter_var($_POST["refMag"], FILTER_SANITIZE_STRING); //$_POST["refMag"] = filter_var($_POST["refMag"], FILTER_SANITIZE_STRING); //$_POST["refMag"] = filter_var($_POST["refMag"], FILTER_SANITIZE_STRING); //$_POST["refMag"] = filter_var($_POST["refMag"], FILTER_SANITIZE_STRING); //$_POST["refMag"] = filter_var($_POST["refMag"], FILTER_SANITIZE_STRING); //$_POST["refMag"] = filter_var($_POST["refMag"], FILTER_SANITIZE_STRING); $_POST["Caract1"] = filter_var($_POST["Caract1"], FILTER_SANITIZE_STRING); $_POST["Caract2"] = filter_var($_POST["Caract2"], FILTER_SANITIZE_STRING); $_POST["Fournisseur"] = filter_var($_POST["Fournisseur"], FILTER_SANITIZE_STRING); $_POST["Ref_Fournisseur"] = filter_var($_POST["Ref_Fournisseur"], FILTER_SANITIZE_STRING); //$_POST["refMag"] = filter_var($_POST["refMag"], FILTER_SANITIZE_STRING); //$_POST["refMag"] = filter_var($_POST["refMag"], FILTER_SANITIZE_STRING); $_POST["CasEmploi1"] = filter_var($_POST["CasEmploi1"], FILTER_SANITIZE_STRING); $_POST["CasEmploi2"] = filter_var($_POST["CasEmploi2"], FILTER_SANITIZE_STRING); $_POST["CasEmploi3"] = filter_var($_POST["CasEmploi3"], FILTER_SANITIZE_STRING); $_POST["CasEmploi4"] = filter_var($_POST["CasEmploi4"], FILTER_SANITIZE_STRING); $_POST["CasEmploi5"] = filter_var($_POST["CasEmploi5"], FILTER_SANITIZE_STRING); $_POST["CasEmploi6"] = filter_var($_POST["CasEmploi6"], FILTER_SANITIZE_STRING); */ try{ function cleanData($dataToClean){ $dataToClean = trim($dataToClean); $dataToClean = stripslashes($dataToClean); $dataCleaned = htmlspecialchars($dataToClean); return $dataCleaned; } $V1 = "1"; $V2 = cleanData($_POST["familleOutil"]); $V3 = cleanData($_POST["SousFamille"]); $V4 = cleanData($_POST["Matiere"]); $V5 = cleanData($_POST["NbreZ"]); $V6 = cleanData($_POST["Dia1"]); $V7 = cleanData($_POST["Long1"]); $V8 = cleanData($_POST["Dia2"]); $V9 = cleanData($_POST["Dia3"]); $V10 = cleanData($_POST["LongUtile"]); $V11 = cleanData($_POST["LongTotale"]); $V12 = cleanData($_POST["Caract1"]); $V13 = "Caract2"; $V14 = cleanData($_POST["Fournisseur"]); $V15 = cleanData($_POST["Ref_Fournisseur"]); $V16 = cleanData($_POST["Prix"]); $V17 = cleanData($_POST["QteMini"]); $V18 = cleanData($_POST["CasEmploi1"]); $V19 = cleanData($_POST["CasEmploi2"]); $V20 = cleanData($_POST["CasEmploi3"]); $V21 = cleanData($_POST["CasEmploi4"]); $V22 = cleanData($_POST["CasEmploi5"]); $V23 = cleanData($_POST["CasEmploi6"]); $connexion = new PDO("mysql:host=$serveur;dbname=hydro", $login, $pass); $connexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $requete = $connexion->prepare( "INSERT INTO cutting_tools_01(REF_MAG,FAMILLE_OUTIL, SOUS_FAMILLE,MATIERE_OUTIL,NBRE_Z,DIA_1,LONGUEUR_1, DIA_2,DIA_3,LONG_UTILE,LONG_TOTALE,CARACT_1,CARACT_2, FOURNISSEUR,REF_FOURNISSEUR,PRIX,QTE_MINI,CAS_EMPLOI_1, CAS_EMPLOI_2,CAS_EMPLOI_3,CAS_EMPLOI_4,CAS_EMPLOI_5,CAS_EMPLOI_6) VALUES(:REF_MAG,:FAMILLE_OUTIL, :SOUS_FAMILLE,:MATIERE_OUTIL,:NBRE_Z,:DIA_1,:LONGUEUR_1, :DIA_2,:DIA_3,:LONG_UTILE,:LONG_TOTALE,:CARACT_1,:CARACT_2, :FOURNISSEUR,:REF_FOURNISSEUR,:PRIX,:QTE_MINI,:CAS_EMPLOI_1, :CAS_EMPLOI_2,:CAS_EMPLOI_3,:CAS_EMPLOI_4,:CAS_EMPLOI_5,:CAS_EMPLOI_6)" ); $requete->bindParam(':REF_MAG', $V1); $requete->bindParam(':FAMILLE_OUTIL', $V2); $requete->bindParam(':SOUS_FAMILLE', $V3); $requete->bindParam(':MATIERE_OUTIL', $V4); $requete->bindParam(':NBRE_Z', $V5); $requete->bindParam(':DIA_1', $V6); $requete->bindParam(':LONGUEUR_1', $V7); $requete->bindParam(':DIA_2', $V8); $requete->bindParam(':DIA_3', $V9); $requete->bindParam(':LONG_UTILE', $V10); $requete->bindParam(':LONG_TOTALE', $V11); $requete->bindParam(':CARACT_1', $V12); $requete->bindParam(':CARACT_2', $V13); $requete->bindParam(':FOURNISSEUR', $V14); $requete->bindParam(':REF_FOURNISSEUR', $V15); $requete->bindParam(':PRIX', $V16); $requete->bindParam(':QTE_MINI', $V17); $requete->bindParam(':CAS_EMPLOI_1', $V18); $requete->bindParam(':CAS_EMPLOI_2', $V19); $requete->bindParam(':CAS_EMPLOI_3', $V20); $requete->bindParam(':CAS_EMPLOI_4', $V21); $requete->bindParam(':CAS_EMPLOI_5', $V22); $requete->bindParam(':CAS_EMPLOI_6', $V23); //echo 'Cas d\' emploi 6 : '.$V23; $requete->execute(); $V0 = $connexion->lastInsertId(); //echo 'id V0=' .$V0; mkdir('C:/wamp64/www/HYDRO/DOCUMENTS_OUTILS/'.$V0,0777); //echo 'arret script'; echo '<script>window.location.replace("Hydro_01.php")</script>'; } catch(PDOException $e){ echo 'ECHEC : ' .$e->getMessage(); } $connexion = null; ?> // $newstr = filter_var($str, FILTER_SANITIZE_STRING);
recherche.php
<!-- ************************************************************ --> <!-- RECHERCHER: FORMULAIRE RECHERCHER UNE REFERENCE DANS LA LISTE --> <!-- ************************************************************ --> <!-- ****** FORMULAIRE RECHERCHER ****** --> <form id='idFormRechercher' action="" method="post"> <div class = legendeR > <p id = 'legendeR1'>Renseigner les champs pour le tri</p> </div> <div class='classFRechercher' id='idDIVFrechercher'> <div class='classFRechercher_P1'> <!-- ****** CHOIX FAMILLE ****** --> <div class='classChoixFamilleR'> <label id='idLblCFamilleR' For="idSlctCFamilleR">FAMILLE OUTIL</label> <select id="idSlctCFamilleR" name = "familleOutil" autofocus > <option value="">--CHOISIR UNE OPTION--</option> <option value="FRAISE">FRAISE</option> <option value="FORET">FORET</option> <option value="TARAUD">TARAUD</option> </select> </div> <!-- ****** CHOIX SOUS FAMILLE ****** --> <div class='classChoix_S_FamilleR'> <label id='idLblC_S_FamilleR' For="idSlctC_S_FamilleR">SOUS FAMILLE</label> <select id="idSlctC_S_FamilleR" name="SousFamille" > <optgroup label=""> <option value="">--CHOISIR UNE OPTION--</option> </optgroup> <optgroup label="FRAISE"> <option value="2_TAILLES">2 TAILLES</option> <option value="TORIQUE">TORIQUE</option> <option value="A_FILETER">A FILETER</option> <option value="3_TAILLES">3 TAILLES</option> </optgroup> <optgroup label="FORET"> <option value="STANDARD">STANDARD</option> <option value="ETAGE">ETAGE</option> <option value="A_POINTER">A POINTER</option> <option value="SPECIAL">SPECIAL</option> </optgroup> <optgroup label="TARAUD"> <option value="COUPANT">COUPANT</option> <option value="DEFORMATION">DEFORMATION</option> </optgroup> </select> </div> <!-- ****** CHOIX MATIERE ****** --> <div class='classChoixMatiereR'> <label id='idLblCMatiereR' For="idSlctCMatiereR">MATIERE OUTIL</label> <select id="idSlctCMatiereR" name = "Matiere" > <option value="">--CHOISIR UNE OPTION--</option> <option value="CARBURE">CARBURE</option> <option value="ACIER_RAPIDE">ACIER RAPIDE</option> </select> </div> <!-- ****** NOMBRE DE DENTS OUTIL ****** --> <div class="classNbreZR"> <label id='idLblCNbreZR' For='idInputNbreZR'>NOMBRE DE DENTS OUTIL</label> <input id = "idInputNbreZR" name = "NbreZ" type = "number" min = "0" max = "4" placeholder = 'NOMBRE DE DENTS'> </div> <!-- ****** DIAMETRE 1 ****** --> <div class="classDia1R"> <label id='idLblCDia1R' For='idInputDia1R'>DIAMETRE 1</label> <input id = "idInputDia1R" name = "Dia1" type = "text" min = "0" max = "500" step = "0.01" placeholder = ' 1 ER DIAMETRE'> </div> <!-- ****** LONGUEUR 1 ****** --> <div class="classLong1R"> <label id='idLblCLong1R' For='idInputLong1R'>LONGUEUR 1</label> <input id = "idInputLong1R" name = "Long1" type = "number" min = "0" max = "200" step = "0.1" placeholder = 'LONGUEUR 1er DIAMETRE'> </div> <!-- ****** DIAMETRE 2 ****** --> <div class="classDia2R"> <label id='idLblCDia2R' For='idInputDia2R'>DIAMETRE 2</label> <input id = "idInputDia2R" name = "Dia2" min = "0" max = "500" type = "text" pattern="[0-9]{1,3}" step = "0.01" placeholder = ' 2 EME DIAMETRE'> </div> <!-- ****** DIAMETRE 3 ****** --> <div class="classDia3R"> <label id='idLblCDia3R' For='idInputDia3R'>DIAMETRE 3</label> <input id = "idInputDia3R" name = "Dia3" type = "text" min = "0" max = "500" step = "0.01" pattern="[0-9]{1,3}" placeholder = ' 3 EME DIAMETRE'> </div> <!-- ****** LONGUEUR UTILE ****** --> <div class="classLongUtileR"> <label id='idLblCLongUtileR' For='idInputLongUtileR'>LONGUEUR UTILE</label> <input id = "idInputLongUtileR" name = "LongUtile" type = "number" min = "0" max = "200" step = "1" placeholder = 'LONGUEUR UTILE'> </div> <!-- ****** LONGUEUR TOTALE ****** --> <div class="classLongTotaleR"> <label id='idLblCLongTotaleR' For='idInputLongTotaleR'>LONGUEUR TOTALE</label> <input id = "idInputLongTotaleR" name = "LongTotale" type = "number" min = "0" max = "250" step = "1" placeholder = 'LONGUEUR TOTALE'> </div> <!-- ****** CARACTERISTIQUE 1 ****** --> <div class="classCaract1R"> <label id='idLblCCaract1R' For='idInputCaract1R'>CARASTERISTIQUE 1</label> <input id = "idInputCaract1R" name = "Caract1" pattern="[a-zA-Z0-9-\s\.]{0,20}" list = "idDataListCaract1" placeholder = 'CARACTERISTIQUE 1'> </div> </div> <div class='classFRechercher_P2'> <!-- ****** FOURNISSEUR ****** --> <div class="classFournisseurR"> <label id='idLblCFournisseurR' For='idInputFournisseurR'>FOURNISSEUR</label> <input id = "idInputFournisseurR" name = "Fournisseur" pattern="[a-zA-Z0-9-\s]{0,12}" list = "idDataListFournisseur" placeholder = 'FOURNISSEUR'> </div> <!-- ****** REFERENCE FOURNISSEUR ****** --> <div class="classRef_FournisseurR"> <label id='idLblCRef_FournisseurR' For='idInputRef_FournisseurR'>REFERENCE FOURNISSEUR</label> <input id = "idInputRef_FournisseurR" name = "Ref_Fournisseur" pattern="[a-zA-Z0-9-\s\.]{0,15}" placeholder = 'REFERENCE FOURNISSEUR'> </div> <!-- ****** PRIX ET QUANTITE MINI ****** --> <div class="classPrixR"> <label id='idLblCPrix_QteMiniR' For='idInputPrixR'>PRIX & QUANTITE MINI</label> <input id = "idInputPrixR" name = "Prix" type = "number" min = "0" placeholder = 'Prix HT'> <input id = "idInputQteMiniR" name = "QteMini" type = "number" min = "0" step = "1" > </div> </div> <div class='classFRechercher_P3'> <!-- ****** CAS D'EMPLOI 1 ****** --> <div class="classCasEmploiR"> <label id='idLblCCasEmploi1R' For='idInputCasEmploi1R'>CAS D'EMPLOI 1</label> <input id = "idInputCasEmploi1R" name = "CasEmploi1" pattern="[A-Z0-9\s]{0,20}" placeholder = 'CAS EMPLOI 1'> </div> <!-- ****** CAS D'EMPLOI 2 ****** --> <div class="classCasEmploiR"> <label id='idLblCCasEmploi2R' For='idInputCasEmploi2R'>CAS D'EMPLOI 2</label> <input id = "idInputCasEmploi2R" name = "CasEmploi2" pattern="[A-Z0-9\s]{0,20}" placeholder = 'CAS EMPLOI 2'> </div> <!-- ****** CAS D'EMPLOI 3 ****** --> <div class="classCasEmploiR"> <label id='idLblCCasEmploi3R' For='idInputCasEmploi3R'>CAS D'EMPLOI 3</label> <input id = "idInputCasEmploi3R" name = "CasEmploi3" pattern="[A-Z0-9\s]{0,20}" placeholder = 'CAS EMPLOI 3'> </div> <!-- ****** CAS D'EMPLOI 4 ****** --> <div class="classCasEmploiR"> <label id='idLblCCasEmploi4R' For='idInputCasEmploi4R'>CAS D'EMPLOI 4</label> <input id = "idInputCasEmploi4R" name = "CasEmploi4" pattern="[A-Z0-9\s]{0,20}" placeholder = 'CAS EMPLOI 4'> </div> <!-- ****** CAS D'EMPLOI 5 ****** --> <div class="classCasEmploiR"> <label id='idLblCCasEmploi5R' For='idInputCasEmploi5R'>CAS D'EMPLOI 5</label> <input id = "idInputCasEmploi5R" name = "CasEmploi5" pattern="[A-Z0-9\s]{0,20}" placeholder = 'CAS EMPLOI 5'> </div> <!-- ****** CAS D'EMPLOI 6 ****** --> <div class="classCasEmploiR"> <label id='idLblCCasEmploi6R' For='idInputCasEmploi6R'>CAS D'EMPLOI 6</label> <input id = "idInputCasEmploi6R" name = "CasEmploi6" pattern="[A-Z0-9\s]{0,20}" placeholder = 'CAS EMPLOI 6'> </div> </div> <!-- ****** BOUTONS RECHERCHE ****** --> <div class = "boutonsRecherche"> <!-- ****** BOUTON VALIDER RECHERCHE ****** --> <input id = "idboutonValiderRecherche" class = 'classboutonValiderRecherche' type = "submit" value = "VALIDER" onclick = "validerRecherche()"> <!-- ****** BOUTON RESET DE RECHERCHE ****** --> <input id = "idboutonResetRecherche" class = 'classboutonResetRecherche' type = "reset" value = "RESET"> <!-- ****** BOUTON FERMER RECHERCHE ****** --> <input id = "idboutonFermerRecherche" class = 'classboutonFermerRecherche' type = "reset" value = "FERMER"> </div> </div> </form>
trouver.php
<?php header("Content-Type: application/json; charset=UTF-8"); error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE); //$_POST = json_decode($_POST["x"], false); // c'est quoi t'est-ce pourquoi pour ????!!! //--------------------------------------------------------------------------// // fonctions diverses... //--------------------------------------------------------------------------// function cleanData($dataToClean=NULL){ $dataToClean = !empty($dataToClean) ? trim($dataToClean) : ""; $dataToClean = stripslashes($dataToClean); //$dataCleaned = htmlspecialchars($dataToClean);// Jamais pour le traitement en BDD.. seulement à l'affichage ! return $dataToclean; } //--------------------------------------------------------------------------// //connexion à la bdd //--------------------------------------------------------------------------// require_once "cnxbdd.php"; //--------------------------------------------------------------------------// // Variables .. //--------------------------------------------------------------------------// $VR = array(); $resultat = array(); $VR0 = cleanData($_POST["id"]); $VR1 = cleanData($_POST["RefMag"]); $VR2 = cleanData($_POST["familleOutil"]); $VR3 = cleanData($_POST["SousFamille"]); $VR4 = cleanData($_POST["Matiere"]); $VR5 = cleanData($_POST["NbreZ"]); $VR6 = cleanData($_POST["Dia1"]); $VR7 = cleanData($_POST["Long1"]); $VR8 = cleanData($_POST["Dia2"]); $VR9 = cleanData($_POST["Dia3"]); $VR10 = cleanData($_POST["LongUtile"]); $VR11 = cleanData($_POST["LongTotale"]); $VR12 = cleanData($_POST["Caract1"]); $VR13 = cleanData($_POST["Caract2"]); $VR14 = cleanData($_POST["Fournisseur"]); $VR15 = cleanData($_POST["Ref_Fournisseur"]); $VR16 = cleanData($_POST["Prix"]); $VR17 = cleanData($_POST["QteMini"]); $VR18 = cleanData($_POST["CasEmploi1"]); $VR19 = cleanData($_POST["CasEmploi2"]); $VR20 = cleanData($_POST["CasEmploi3"]); $VR21 = cleanData($_POST["CasEmploi4"]); $VR22 = cleanData($_POST["CasEmploi5"]); $VR23 = cleanData($_POST["CasEmploi6"]); // colonne de la table $VR = array ("id"=>$VR0, "REF_MAG"=>$VR1, "FAMILLE_OUTIL"=>$VR2, "SOUS_FAMILLE"=>$VR3, "MATIERE_OUTIL"=>$VR4, "NBRE_Z"=>$VR5, "DIA_1"=>$VR6, "LONGUEUR_1"=>$VR7, "DIA_2"=>$VR8, "DIA_3"=>$VR9, "LONG_UTILE"=>$VR10, "LONG_TOTALE"=>$VR11, "CARACT_1"=>$VR12, "CARACT_2"=>$VR13, "FOURNISSEUR"=>$VR14, "REF_FOURNISSEUR"=>$VR15, "PRIX"=>$VR16, "QTE_MINI"=>$VR17, "CAS_EMPLOI_1"=>$VR18, "CAS_EMPLOI_2"=>$VR19, "CAS_EMPLOI_3"=>$VR20, "CAS_EMPLOI_4"=>$VR21, "CAS_EMPLOI_5"=>$VR22, "CAS_EMPLOI_6"=>$VR23 ); $concat = "" ; $datas = array(); foreach($VR as $VRn => $VRn_value){ if($VRn_value !== ""){ $concat = $concat. " AND ".$VRn. " = :" .$VRn ; $datas[":" .$VRn] = $VRn_value; }; }; $condition = ltrim($concat,"AND"); //--------------------------------------------------------------------------// // REQUETE //--------------------------------------------------------------------------// $sql = 'SELECT id FROM cutting_tools_01 '; $sql .= !empty($condition)? ' WHERE' . $condition : ""; try{ $requete = $connexion->prepare($sql); $requete->execute($datas); $resultat = $requete->fetchAll(PDO::FETCH_ASSOC); }catch(PDOException $e){ echo 'ECHEC : ' .$e->getMessage(); } //--------------------------------------------------------------------------// //on renvoi la réponse au script ajax au format json //--------------------------------------------------------------------------// echo json_encode(array('result'=>$resultat,'sql'=>$sql,'datas'=>$datas);
GESTION_OUTILS.js
// TRI DU TABLEAU PAR CLICK SUR UNE ENTETE DE COLONNE // Sources: https://www.pierre-giraud.com/trier-tableau-javascript/ // FONCTION DE TRIAGE DES LIGNES const compare = (ids, asc) => (row1, row2) => { const tdValue = (row, ids) => row.children[ids].textContent; const tri = (v1, v2) => v1 !== '' && v2 !== '' && !isNaN(v1) && !isNaN(v2) ? v1 - v2 : v1.toString().localeCompare(v2); return tri(tdValue(asc ? row1 : row2, ids), tdValue(asc ? row2 : row1, ids)); }; // RECUPERATION DES VALEURS DU TABLEAU D'OUTILS const table_outils_originale = document.querySelector('tbody'); const entetes_colonnes_tableau = document.querySelectorAll('th'); const lignes_tableau = table_outils_originale.querySelectorAll('tr'); // ECOUTE DU CLICK SUR ENTETE DE COLONNE POUR TRI DU TABLEAU // ci-dessous, th est une variable qui aurait pu être nommée differement. entetes_colonnes_tableau.forEach(th => th.addEventListener('click', () => { let classe = Array.from(lignes_tableau).sort(compare(Array.from(entetes_colonnes_tableau).indexOf(th), this.asc = !this.asc)); classe.forEach(tr => table_outils_originale.appendChild(tr)); })); //---------*************----------************------------- // BOUTON CREER // //---------*************----------************------------- function fCreation(){ let page = document.body ; let formCreation = document.getElementById('idFormCreer') ; let formCreationDiv = document.getElementById('idDIVFCreer') ; formCreation.style.display = 'block' ; // NEUTRALISER LES 4 BOUTONS : CREER, RECHERCHER, MODIFIER, RESET. creation.removeEventListener('click',fCreation) ; recherche.removeEventListener('click',fRecherche) ; modification.removeEventListener('click',fModification) ; raz.removeEventListener('click',fReset) ; } // BOUTON FERMER CREATION let boutonFermerCreation = document.getElementById('idboutonFermerCreation'); boutonFermerCreation.addEventListener('click',fermerCreation ) ; // FONCTION DU BOUTON FERMER DU FORMULAIRE CREER function fermerCreation (){ let formCreation2 = document.getElementById('idFormCreer') ; creation.addEventListener('click',fCreation) ; recherche.addEventListener('click',fRecherche) ; modification.addEventListener('click',fModification) ; raz.addEventListener('click',fReset) ; formCreation2.style.display = 'none' } //ECOUTE DU CLICK SUR BOUTON CREER let creation = document.getElementById('creer') ; creation.addEventListener('click',fCreation) ; //---------*************----------************------------- // BOUTON RECHERCHER // //---------*************----------************------------- function fRecherche(){ let page = document.body ; let formRecherche = document.getElementById('idFormRechercher') ; let formRechercheDiv = document.getElementById('idDIVFrechercher') ; formRecherche.style.display = 'block' ; // NEUTRALISER LES 4 BOUTONS : CREER, RECHERCHER, MODIFIER, RESET. creation.removeEventListener('click',fCreation) ; recherche.removeEventListener('click',fRecherche) ; modification.removeEventListener('click',fModification) ; raz.removeEventListener('click',fReset) ; } //BOUTON FERMER RECHERCHE let boutonFermerRecherche = document.getElementById('idboutonFermerRecherche'); boutonFermerRecherche.addEventListener('click',fermerRecherche ) ; // FONCTION DU BOUTON FERMER DU FORMULAIRE RECHERCHE // Revalider les quatres boutons de l'entete - voir à utiliser attribut onclick de form function fermerRecherche (){ let formRecherche2 = document.getElementById('idFormRechercher') ; creation.addEventListener('click',fCreation) ; recherche.addEventListener('click',fRecherche) ; modification.addEventListener('click',fModification) ; raz.addEventListener('click',fReset) ; formRecherche2.style.display = 'none'; } //BOUTON VALIDER RECHERCHE // reference www.w3schools.com -> JAVA SCRIPT / JSON PHP let boutonValiderRecherche = document.getElementById('idboutonValiderRecherche'); boutonValiderRecherche.addEventListener('click',validerRecherche) ; function validerRecherche(){ console.log("On entre dans la fonction validerRecherche"); var xmlhttp ="", resultRecherche = "", x ="", idRow ="" ; xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { console.log("Success",xmlhttp); resultRecherche = JSON.parse(this.responseText); for (x in resultRecherche) { idRow = document.getElementById('x'); idRow.style.display = 'none'; } } else { console.log(xmlhttp, xmlhttp.status); } }; xmlhttp.open("POST", "trouver.php", true); xmlhttp.onerror = function () { console.log(xmlhttp, xmlhttp.status); alert("Erreur ajax : Regarder la console pour plus de détails !"); }; xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.send(); } //ECOUTE DU CLICK SUR BOUTON RECHERCHE let recherche = document.getElementById('chercher') ; recherche.addEventListener('click',fRecherche) ; //---------*************----------************------------- // BOUTON MODIFIER // //---------*************----------************------------- function fModification(){ document.getElementById('table_outils').style.marginTop = '75px' ; alert('Modifier une référence!!') ; } //ECOUTE DU CLICK SUR BOUTON MODIFIER let modification = document.getElementById('modifier') ; modification.addEventListener('click',fModification) ; // BOUTON RESET function fReset(){ alert('Reset tableau outils!!') ; } //ECOUTE DU CLICK SUR BOUTON RESET let raz = document.getElementById('reset') ; raz.addEventListener('click',fReset) ;
entete.php
<body> <h1>BASE DE GESTION DES OUTILS COUPANTS</h1> <div class='classButton' id='divButton'> <button class='bouton_creer' id='creer'>CREER UNE NOUVELLE REFERENCE</button> <button class='bouton_chercher' id='chercher'>RECHERCHE PAR FILTRES</button> <button class='bouton_modifier' id='modifier'>MODIFIER UNE REFERENCE</button> <button class='bouton_reset' id='reset'>RESET</button> </div> </body>
style.css
body{ margin: 0px; padding: 0px; } h1{ text-align: center; float: none; color: rgb(85, 10, 160) ; width: 50% ; // background-color:#444d55; border: thick groove rgb(224,240,255); margin-left: 25%; } h3{ text-align: center; float: none; color: rgb(10,10,20); width: 50% ; // background-color: #444d55; border: thick groove rgb(10,240,10); margin-left: 25%; } .classButton{ //background: #444d55; } /* *************************************** */ /* LES 4 BOUTONS */ /* *************************************** */ .bouton_creer{ width: 200px; height: 40px; color: yellow; background-color: red; float: left; margin-bottom: 1px; margin-left: 2px; } .bouton_chercher{ width: 200px; height: 40px; color: yellow; background-color: blue; float: left; margin-bottom: 10px; } .bouton_modifier{ width: 200px; height: 40px; color: yellow; background-color: green; float: left; margin-bottom: 10px; } .bouton_reset{ width: 200px; height: 40px; font-weight: bolder; color: white; background-color: black; float: left; margin-bottom: 10px; } .classButton{ /* border: normal solid rgb(0,0,0); */ background-color: rgb(240,240,240); margin-top: 15px; padding: 5px; width: 100%; height: 40px; margin-left: 0px; } /* *************************************** */ /* FORMULAIRE & FENETRE DE CREATION */ /* *************************************** */ #idFormCreer{ display: none; border: 3px solid rgb(255,0,0); width: 1200px; background-color: rgb(255,0,10); padding-bottom: 10px; } .legende{ display: block; grid-template-columns: 1fr 1fr ; border: thin solid white; padding: 5px; margin-left: 10px; margin-top: 5px; margin-bottom: 5px; width: 560px; } #legende1{ display: inline; margin-left: 10px; color: rgb(255,255,255); font-size: large; } #legende2{ display: inline; margin-left: 1px; color: rgb(255,255,255); background-color: rgb(151,151,151); font-size: large; padding-left: 5px; padding-right: 5px; } .classFCreer{ background-color: rgba(255,155,200, 1); margin-left: 10px; margin-right: 10px; padding-top: 10px; } /* *************************************** */ /* INTERIEUR FORM CREATION */ /* *************************************** */ .classFCreer_P1{ display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; grid-template-rows: 65px 65px 65px ; border: 3px solid rgb(102,0,255); padding: 10px ; margin: 10px ; margin-top: 0px; height: 200px; } .classChoixFamille{ display: block; background-color: rgba(10, 10, 220, 0.3); width: 80%; height: 55px; border: thin solid rgb(10,10,220); } #idLblCFamille{ display: block; text-align: center; margin-top: 5px; } #idSlctCFamille{ display: block; margin-left: 25px; margin-top: 5px; // margin-bottom: 5px; } .classChoix_S_Famille{ display: block; background-color: rgba(10, 10, 220, 0.3); width: 80%; height: 55px; border: thin solid rgb(10,10,220); } #idLblC_S_Famille{ display: block; text-align: center; margin-top: 5px; } #idSlctC_S_Famille{ display: block; margin-left: 10px; margin-top: 5px; margin-bottom: 5px; } .classChoixMatiere{ display: block; background-color: rgba(10, 10, 220, 0.3); width: 80%; height: 55px; border: thin solid rgb(10,10,220); } #idLblCMatiere{ text-align: center; display: block; margin-top: 5px; } #idSlctCMatiere{ display: block; margin-left: 25px; margin-top: 5px; } .classNbreZ{ display: block; background-color: rgba(10, 10, 220, 0.3); width: 80%; height: 55px; border: thin solid rgb(10,10,220); } #idLblCNbreZ{ text-align: center; display: block; margin-top: 5px; } #idInputNbreZ{ display: block; margin-left: 40px; margin-top: 5px; } .classDia1{ display: block; background-color: rgba(10, 10, 220, 0.3); width: 80%; margin-top: 5px; height: 55px; border: thin solid rgb(10,10,220); } #idLblCDia1{ text-align: center; display: block; margin-top: 5px; } #idInputDia1{ display: block; margin-left: 40px; margin-top: 5px; } .classLong1{ display: block; background-color: rgba(10, 10, 220, 0.3); width: 80%; margin-top: 5px; height: 55px; border: thin solid rgb(10,10,220); } #idLblCLong1{ text-align: center; display: block; margin-top: 5px; } #idInputLong1{ display: block; margin-left: 40px; margin-top: 5px; } .classDia2{ display: block; //background-color: rgba(10, 10, 220, 0.3); width: 80%; margin-top: 10px; height: 55px; border: thin solid rgb(10,10,220); } #idLblCDia2{ text-align: center; display: block; margin-top: 5px; } #idInputDia2{ display: block; margin-left: 40px; margin-top: 5px; } .classDia3{ display: block; //background-color: rgba(10, 10, 220, 0.3); width: 80%; margin-top: 10px; height: 55px; border: thin solid rgb(10,10,220); } #idLblCDia3{ text-align: center; display: block; margin-top: 5px; } #idInputDia3{ display: block; margin-left: 40px; margin-top: 5px; } .classLongUtile{ display: block; background-color: rgba(10, 10, 220, 0.3); width: 80%; margin-top: 10px; height: 55px; border: thin solid rgb(10,10,220); } #idLblCLongUtile{ display: block; text-align: center; margin-top: 5px; } #idInputLongUtile{ display: block; margin-left: 40px; margin-top: 5px; } .classLongTotale{ display: block; background-color: rgba(10, 10, 220, 0.3); width: 80%; margin-top: 10px; height: 55px; border: thin solid rgb(10,10,220); } #idLblCLongTotale{ display: block; text-align: center; margin-top: 5px; } #idInputLongTotale{ display: block; margin-left: 40px; margin-top: 5px; } .classCaract1{ display: block; //background-color: rgba(10, 10, 220, 0.3); width: 80%; margin-top: 10px; border: thin solid rgb(10,10,220); } #idLblCCaract1{ display: block; text-align: center; margin-top: 5px; } #idInputCaract1{ display: block; margin-left: 40px; margin-top: 5px; } .classFCreer_P2{ display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 75px ; border: 3px solid rgb(255,0,100); padding: 10px ; margin: 10px ; } .classFournisseur{ display: block; background-color: rgba(200,20,25,0.3); width: 80%; padding: 10px ; border: thin solid rgb(200,20,25); } #idLblCFournisseur{ display: block; text-align: center; margin-top: 5px; margin-bottom: 10px; } #idInputFournisseur{ display: block; margin-left: 75px; } .classRef_Fournisseur{ display: block; background-color: rgba(200,20,25,0.3); width: 80%; padding: 10px ; border: thin solid rgb(200,20,25); } #idLblCRef_Fournisseur{ display: block; text-align: center; margin-top: 5px; margin-bottom: 10px; } #idInputRef_Fournisseur{ display: block; margin-left: 75px; } .classPrix{ display: grid; grid-template-columns: repeat(2, 1fr); grid-gap: 10px ; //grid-auto-rows: minmax(auto,auto); background-color: rgba(200,20,25,0.3); //width: 100%; padding: 10px ; border: thin solid rgb(200,20,25); } #idLblCPrix_QteMini{ display: block; text-align: center; grid-column: 1 / 3; grid-row: 1; //margin-top: 5px; //margin-bottom: 10px; //max-width: 100%; } #idInputPrix{ display: block; grid-column: 1 / 2; grid-row: 2; // max-width: 40%; } #idInputQteMini{ display: block; grid-column: 2 / 3; grid-row: 2; // max-width: 40%; } .classFCreer_P3{ display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 50px 50px ; border: 3px solid rgb(20,100,20); padding: 20px ; margin: 10px ; height: 80px; } .classCasEmploi{ display: block; } #idInputCasEmploi1, #idInputCasEmploi2 , #idInputCasEmploi3 , #idInputCasEmploi4 , #idInputCasEmploi5 , #idInputCasEmploi6{ margin-left: 10px; //border: medium solid rgb(204,0,0); } /* *************************************** */ /* 3 BOUTONS DE CREATION */ /* *************************************** */ .boutonsCreation{ //border: thin solid black; margin-top: 10px; margin-left: 10px; margin-bottom: 10px; height: 45px; } #idboutonResetCreation{ background-color: rgb(255,115,0); font-size: x-large; margin-right: 10px; } #idboutonValiderCreation{ background-color: rgb(0,176,32); font-size: x-large; margin-right: 10px; } #idboutonFermerCreation{ background-color: rgb(255,51,102); font-size: x-large; margin-right: 10px; } /* *************************************** */ /* FORMULAIRE RECHERCHE */ /* *************************************** */ #idFormRechercher{ display: none; border: 3px solid rgb(0,0,255); width: 1200px; background-color: rgb(10,0,255); padding-bottom: 10px; } .legendeR{ display: block; grid-template-columns: 1fr ; border: thin solid white; padding: 5px; margin-left: 10px; margin-top: 5px; margin-bottom: 5px; width: 280px; } #legendeR1{ display: inline; margin-left: 10px; color: rgb(255,255,255); font-size: large; } /* #legendeR2{ display: inline; margin-left: 1px; color: rgb(255,255,255); background-color: rgb(151,151,151); font-size: large; padding-left: 5px; padding-right: 5px; } */ .classFRechercher{ background-color: rgba(155,155,255, 1); margin-left: 10px; margin-right: 10px; padding-top: 10px; } .classFRechercher_P1{ display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; grid-template-rows: 65px 65px 65px ; border: 3px solid rgb(102,0,255); padding: 10px ; margin: 10px ; margin-top: 0px; height: 200px; } .classChoixFamilleR{ display: block; //background-color: rgba(10, 10, 220, 0.3); width: 80%; height: 55px; border: thin solid rgb(10,10,220); } #idLblCFamilleR{ display: block; text-align: center; margin-top: 5px; } #idSlctCFamilleR{ display: block; margin-left: 25px; margin-top: 5px; // margin-bottom: 5px; } .classChoix_S_FamilleR{ display: block; //background-color: rgba(10, 10, 220, 0.3); width: 80%; height: 55px; border: thin solid rgb(10,10,220); } #idLblC_S_FamilleR{ display: block; text-align: center; margin-top: 5px; } #idSlctC_S_FamilleR{ display: block; margin-left: 10px; margin-top: 5px; margin-bottom: 5px; } .classChoixMatiereR{ display: block; //background-color: rgba(10, 10, 220, 0.3); width: 80%; height: 55px; border: thin solid rgb(10,10,220); } #idLblCMatiereR{ text-align: center; display: block; margin-top: 5px; } #idSlctCMatiereR{ display: block; margin-left: 25px; margin-top: 5px; } .classNbreZR{ display: none; //background-color: rgba(10, 10, 220, 0.3); width: 80%; height: 55px; border: thin solid rgb(10,10,220); } #idLblCNbreZR{ text-align: center; display: block; margin-top: 5px; } #idInputNbreZR{ display: block; margin-left: 40px; margin-top: 5px; } .classDia1R{ display: block; //background-color: rgba(10, 10, 220, 0.3); width: 80%; margin-top: 5px; height: 55px; border: thin solid rgb(10,10,220); } #idLblCDia1R{ text-align: center; display: block; margin-top: 5px; } #idInputDia1R{ display: block; margin-left: 40px; margin-top: 5px; } .classLong1R{ display: none; //background-color: rgba(10, 10, 220, 0.3); width: 80%; margin-top: 5px; height: 55px; border: thin solid rgb(10,10,220); } #idLblCLong1R{ text-align: center; display: block; margin-top: 5px; } #idInputLong1R{ display: block; margin-left: 40px; margin-top: 5px; } .classDia2R{ display: block; //background-color: rgba(10, 10, 220, 0.3); width: 80%; margin-top: 10px; height: 55px; border: thin solid rgb(10,10,220); } #idLblCDia2R{ text-align: center; display: block; margin-top: 5px; } #idInputDia2R{ display: block; margin-left: 40px; margin-top: 5px; } .classDia3R{ display: none; //background-color: rgba(10, 10, 220, 0.3); width: 80%; margin-top: 10px; height: 55px; border: thin solid rgb(10,10,220); } #idLblCDia3R{ text-align: center; display: block; margin-top: 5px; } #idInputDia3R{ display: block; margin-left: 40px; margin-top: 5px; } .classLongUtileR{ display: block; //background-color: rgba(10, 10, 220, 0.3); width: 80%; margin-top: 10px; height: 55px; border: thin solid rgb(10,10,220); } #idLblCLongUtileR{ display: block; text-align: center; margin-top: 5px; } #idInputLongUtileR{ display: block; margin-left: 40px; margin-top: 5px; } .classLongTotaleR{ display: none; //background-color: rgba(10, 10, 220, 0.3); width: 80%; margin-top: 10px; height: 55px; border: thin solid rgb(10,10,220); } #idLblCLongTotaleR{ display: block; text-align: center; margin-top: 5px; } #idInputLongTotaleR{ display: block; margin-left: 40px; margin-top: 5px; } .classCaract1R{ display: block; //background-color: rgba(10, 10, 220, 0.3); width: 80%; margin-top: 10px; border: thin solid rgb(10,10,220); } #idLblCCaract1R{ display: block; text-align: center; margin-top: 5px; } #idInputCaract1R{ display: block; margin-left: 40px; margin-top: 5px; } .classFRechercher_P2{ display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 75px ; border: 3px solid rgb(255,0,100); padding: 10px ; margin: 10px ; } .classFournisseurR{ display: block; //background-color: rgba(200,20,25,0.3); width: 80%; padding: 10px ; border: thin solid rgb(200,20,25); } #idLblCFournisseurR{ display: block; text-align: center; margin-top: 5px; margin-bottom: 10px; } #idInputFournisseurR{ display: block; margin-left: 75px; } .classRef_FournisseurR{ display: block; //background-color: rgba(200,20,25,0.3); width: 80%; padding: 10px ; border: thin solid rgb(200,20,25); } #idLblCRef_FournisseurR{ display: block; text-align: center; margin-top: 5px; margin-bottom: 10px; } #idInputRef_FournisseurR{ display: block; margin-left: 75px; } .classPrixR{ display: none; grid-template-columns: repeat(2, 1fr); grid-gap: 10px ; //grid-auto-rows: minmax(auto,auto); //background-color: rgba(200,20,25,0.3); //width: 100%; padding: 10px ; border: thin solid rgb(200,20,25); } #idLblCPrix_QteMiniR{ display: block; text-align: center; grid-column: 1 / 3; grid-row: 1; //margin-top: 5px; //margin-bottom: 10px; //max-width: 100%; } #idInputPrixR{ display: block; grid-column: 1 / 2; grid-row: 2; // max-width: 40%; } #idInputQteMiniR{ display: block; grid-column: 2 / 3; grid-row: 2; // max-width: 40%; } .classFRechercher_P3{ display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 50px 50px ; border: 3px solid rgb(20,100,20); padding: 20px ; margin: 10px ; height: 80px; } .classCasEmploiR{ display: block; } #idInputCasEmploi1R, #idInputCasEmploi2R{ margin-left: 10px; //border: medium solid rgb(204,0,0); } #idInputCasEmploi3R, #idLblCCasEmploi3R, #idInputCasEmploi4R, #idLblCCasEmploi4R, #idInputCasEmploi5R, #idLblCCasEmploi5R ,#idInputCasEmploi6R, #idLblCCasEmploi6R{ display: none; margin-left: 10px; //border: medium solid rgb(204,0,0); } /* *************************************** */ /* 3 BOUTONS DE RECHERCHE */ /* *************************************** */ .boutonsRecherche{ //border: thin solid black; margin-top: 10px; margin-left: 10px; margin-bottom: 10px; height: 45px; } #idboutonResetRecherche{ background-color: rgb(255,115,0); font-size: x-large; margin-right: 10px; } #idboutonValiderRecherche{ background-color: rgb(0,176,32); font-size: x-large; margin-right: 10px; } #idboutonFermerRecherche{ background-color: rgb(255,51,102); font-size: x-large; margin-right: 10px; } /* *************************************** */ /* TABLE OUTILS */ /* *************************************** */ table{ text-align: center; margin-top: 10px; border : solid green 2px; border-collapse: separate; } th,td{ margin: 0px; padding: 0px 4px; border: 1px solid black; } th{ background-color: rgb(48,127,208); } tr:nth-child(even) { background-color: rgba(0,192,64, 0.5); }
Ce que je ne comprends pas c'est que même le console. Log au début de ta fonction n'apparaît même pas...
Tu n'as rien d'autre qui apparaît dans la console de ton navigateur ?!
ajoute des console.log ailleurs dans ton code javascript et regarde si ils s'affichent dans la console...
si ce n'est pas le cas c'est que ton JavaScript n'est pas recharger dans ton avis gateur correctement.
Essai en navigation privée pour voir...
Tu n'as rien d'autre qui apparaît dans la console de ton navigateur ?!
ajoute des console.log ailleurs dans ton code javascript et regarde si ils s'affichent dans la console...
si ce n'est pas le cas c'est que ton JavaScript n'est pas recharger dans ton avis gateur correctement.
Essai en navigation privée pour voir...
Bonjour Jordan,
ok, j'ai trouvé le problème avec le bouton , maintenant on rentre bien dans la fonction, j'ai une erreur avec le json .
J'ai refait le bouton valider: il manquait la destination pour le formulaire Recherche : action="":
J'ai changer le type du bouton qui était "submit" en "button"
et dans le fichier trouver, il manquait une parenthese à la fin:
Maintenant il reste une erreur dans la réponse le json a un problème:



En tout les cas, merci beaucoup de votre aide, grâce à vous, j'avance .
JC
ok, j'ai trouvé le problème avec le bouton , maintenant on rentre bien dans la fonction, j'ai une erreur avec le json .
J'ai refait le bouton valider: il manquait la destination pour le formulaire Recherche : action="":
<!-- ****** FORMULAIRE RECHERCHER ****** --> <form id='idFormRechercher' action="trouver.php" method="post"> <div class = legendeR >
J'ai changer le type du bouton qui était "submit" en "button"
<!-- ****** BOUTON VALIDER RECHERCHE ****** onclick = "validerRecherche() --> <input id = "idboutonValiderRecherche" class = 'classboutonValiderRecherche' type = "button" value = "VALIDER" ">
et dans le fichier trouver, il manquait une parenthese à la fin:
echo json_encode(array('result'=>$resultat,'sql'=>$sql,'datas'=>$datas));
Maintenant il reste une erreur dans la réponse le json a un problème:



En tout les cas, merci beaucoup de votre aide, grâce à vous, j'avance .
JC
La réponse est composé de plusieurs parties; je ne suis pas sur de ce que tu veux exactement mais je t'envoie tout. De plus il semble qu'il n'a passé aucun parametre pour la requête.

En fait je n'ai pu passer que la charge utile...
La charge utile:
EDIT : Ajout du LANGAGE dans les balises de code pour avoir la coloration syntaxique, l'indentation et la numérotation des lignes....
Merci d'y penser à l'avenir !

En fait je n'ai pu passer que la charge utile...
La charge utile:
<br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: id in C:\wamp64\www\HYDRO\trouver.php on line <i>32</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.1343</td><td bgcolor='#eeeeec' align='right'>408248</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>32</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: RefMag in C:\wamp64\www\HYDRO\trouver.php on line <i>33</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.2069</td><td bgcolor='#eeeeec' align='right'>408248</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>33</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: familleOutil in C:\wamp64\www\HYDRO\trouver.php on line <i>34</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.2843</td><td bgcolor='#eeeeec' align='right'>408216</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>34</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: SousFamille in C:\wamp64\www\HYDRO\trouver.php on line <i>35</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.3315</td><td bgcolor='#eeeeec' align='right'>408216</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>35</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: Matiere in C:\wamp64\www\HYDRO\trouver.php on line <i>36</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.3703</td><td bgcolor='#eeeeec' align='right'>408216</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>36</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: NbreZ in C:\wamp64\www\HYDRO\trouver.php on line <i>37</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.4088</td><td bgcolor='#eeeeec' align='right'>408216</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>37</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: Dia1 in C:\wamp64\www\HYDRO\trouver.php on line <i>38</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.4550</td><td bgcolor='#eeeeec' align='right'>408216</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>38</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: Long1 in C:\wamp64\www\HYDRO\trouver.php on line <i>39</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.5577</td><td bgcolor='#eeeeec' align='right'>408216</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>39</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: Dia2 in C:\wamp64\www\HYDRO\trouver.php on line <i>40</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.6938</td><td bgcolor='#eeeeec' align='right'>408216</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>40</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: Dia3 in C:\wamp64\www\HYDRO\trouver.php on line <i>41</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.7750</td><td bgcolor='#eeeeec' align='right'>408216</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>41</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: LongUtile in C:\wamp64\www\HYDRO\trouver.php on line <i>42</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.8331</td><td bgcolor='#eeeeec' align='right'>408216</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>42</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: LongTotale in C:\wamp64\www\HYDRO\trouver.php on line <i>43</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.8878</td><td bgcolor='#eeeeec' align='right'>408216</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>43</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: Caract1 in C:\wamp64\www\HYDRO\trouver.php on line <i>44</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.9328</td><td bgcolor='#eeeeec' align='right'>408216</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>44</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: Caract2 in C:\wamp64\www\HYDRO\trouver.php on line <i>45</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.9694</td><td bgcolor='#eeeeec' align='right'>408216</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>45</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: Fournisseur in C:\wamp64\www\HYDRO\trouver.php on line <i>46</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>1.0182</td><td bgcolor='#eeeeec' align='right'>408216</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>46</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: Ref_Fournisseur in C:\wamp64\www\HYDRO\trouver.php on line <i>47</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>1.0927</td><td bgcolor='#eeeeec' align='right'>408216</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>47</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: Prix in C:\wamp64\www\HYDRO\trouver.php on line <i>48</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>1.2001</td><td bgcolor='#eeeeec' align='right'>408216</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>48</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: QteMini in C:\wamp64\www\HYDRO\trouver.php on line <i>49</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>1.3010</td><td bgcolor='#eeeeec' align='right'>408216</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>49</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: CasEmploi1 in C:\wamp64\www\HYDRO\trouver.php on line <i>50</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>1.4361</td><td bgcolor='#eeeeec' align='right'>408216</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>50</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: CasEmploi2 in C:\wamp64\www\HYDRO\trouver.php on line <i>51</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>1.5472</td><td bgcolor='#eeeeec' align='right'>408216</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>51</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: CasEmploi3 in C:\wamp64\www\HYDRO\trouver.php on line <i>52</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>1.5997</td><td bgcolor='#eeeeec' align='right'>408216</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>52</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: CasEmploi4 in C:\wamp64\www\HYDRO\trouver.php on line <i>53</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>1.6421</td><td bgcolor='#eeeeec' align='right'>408216</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>53</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: CasEmploi5 in C:\wamp64\www\HYDRO\trouver.php on line <i>54</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>1.6772</td><td bgcolor='#eeeeec' align='right'>408216</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>54</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: CasEmploi6 in C:\wamp64\www\HYDRO\trouver.php on line <i>55</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: dataToclean in C:\wamp64\www\HYDRO\trouver.php on line <i>17</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> <tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>1.7168</td><td bgcolor='#eeeeec' align='right'>408216</td><td bgcolor='#eeeeec'>cleanData( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>55</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: connexion in C:\wamp64\www\HYDRO\trouver.php on line <i>103</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font> <br /> <font size='1'><table class='xdebug-error xe-uncaught-exception' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Fatal error: Uncaught Error: Call to a member function prepare() on null in C:\wamp64\www\HYDRO\trouver.php on line <i>103</i></th></tr> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Error: Call to a member function prepare() on null in C:\wamp64\www\HYDRO\trouver.php on line <i>103</i></th></tr> <tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> <tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> <tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp64\www\HYDRO\trouver.php' bgcolor='#eeeeec'>...\trouver.php<b>:</b>0</td></tr> </table></font>
EDIT : Ajout du LANGAGE dans les balises de code pour avoir la coloration syntaxique, l'indentation et la numérotation des lignes....
Merci d'y penser à l'avenir !
Ici la réponse avec readyState = 4, mais j'arrive pas à tout exporter.
Success XMLHttpRequest { onreadystatechange: onreadystatechange(), readyState: 4, timeout: 0, withCredentials: false, upload: XMLHttpRequestUpload, responseURL: "http://hydro/trouver.php", status: 200, statusText: "OK", responseType: "", response: "<br />\n<font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'>\n<tr><th align='left' bgcolor='#f57900' colspan=\"5\"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: id in C:\\wamp64\\www\\HYDRO\\trouver.php on line <i>32</i></th></tr>\n<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>\n<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>\n<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>407024</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\\wamp64\\www\\HYDRO\\trouver.php' bgcolor='#eeeeec'>...\\trouver.php<b>:</b>0</td></tr>\n</table></font>\n<br />\n<font size='1'><table class='xdebug-error xe…" } GESTION_OUTILS.js:119:12
Ci joint le fichier cnxbdd:
JC
<?php $serveur = "localhost"; $login = "root"; $pass = "";
JC
ok, c'est fait, j'ai vu que je les avais oubliées.
Maintenant ça va beaucoup mieux au vu du retour de la console.
Dernier petit problème , c'est le traitement du résultat dans le JS.
Maintenant on renvoie un tableau avec 3 éléments dans le JS , et du coup
n'est plus adapté.
J' hésite entre retourner que la variable $resultat ou modifier ma boucle " for (x in resultRecherche)" mais j'ai un doute sur la syntaxe.
JC
Maintenant ça va beaucoup mieux au vu du retour de la console.
Dernier petit problème , c'est le traitement du résultat dans le JS.
Maintenant on renvoie un tableau avec 3 éléments dans le JS , et du coup
for (x in resultRecherche) { idRow = document.getElementById('x'); idRow.style.display = 'none';
n'est plus adapté.
J' hésite entre retourner que la variable $resultat ou modifier ma boucle " for (x in resultRecherche)" mais j'ai un doute sur la syntaxe.
JC
function validerRecherche(){ console.log("On entre dans la fonction validerRecherche"); var xmlhttp ="", resultRecherche = "", x ="", idRow ="" ; xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { //console.log("Success",xmlhttp); resultRecherche = JSON.parse(this.responseText); if(typeof(resultRecherche)!='undefined' && resultRecherche!=null){ var result = typeof(resultRecherche.result)!='undefined' ? resultRecherche.result : null; if(result){ for (x in result) { console.log('x',x); idRow = document.getElementById(x); idRow.style.display = 'none'; } }else{ console.log('no result !'); } } } else { console.log(xmlhttp, xmlhttp.status); } }; xmlhttp.open("POST", "trouver.php", true); xmlhttp.onerror = function () { console.log(xmlhttp, xmlhttp.status); alert("Erreur ajax : Regarder la console pour plus de détails !"); }; xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.send(); }
Bonsoir,
encore une question,
J'ai repassé le bouton en type "submit" et cette fois j'ai bien les paramètres d'entrée dans la console, mais la réponse donne un problème de synthaxe. D'où est ce que ça vient?
Je rejoint le code PHP
encore une question,
J'ai repassé le bouton en type "submit" et cette fois j'ai bien les paramètres d'entrée dans la console, mais la réponse donne un problème de synthaxe. D'où est ce que ça vient?
Je rejoint le code PHP
<?php header("Content-Type: application/json; charset=UTF-8"); error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE); //$_POST = json_decode($_POST["x"], false); // c'est quoi t'est-ce pourquoi pour ????!!! //--------------------------------------------------------------------------// // fonctions diverses... //--------------------------------------------------------------------------// function cleanDataPOST($dataToClean=NULL,$defaultValue=""){ $result = !empty($_POST[$dataToClean]) ? trim($_POST[$dataToClean]) : $defaultValue; $result = stripslashes($result); return $result; } //--------------------------------------------------------------------------// //connexion à la bdd //--------------------------------------------------------------------------// require_once "cnxbdd.php"; //--------------------------------------------------------------------------// // Variables .. //--------------------------------------------------------------------------// $VR = array(); $resultat = array(); $VR0 = cleanDataPOST("id"); $VR1 = cleanDataPOST("RefMag"); $VR2 = cleanDataPOST("familleOutil"); $VR3 = cleanDataPOST("SousFamille"); $VR4 = cleanDataPOST("Matiere"); $VR5 = cleanDataPOST("NbreZ"); $VR6 = cleanDataPOST("Dia1"); $VR7 = cleanDataPOST("Long1"); $VR8 = cleanDataPOST("Dia2"); $VR9 = cleanDataPOST("Dia3"); $VR10 = cleanDataPOST("LongUtile"); $VR11 = cleanDataPOST("LongTotale"); $VR12 = cleanDataPOST("Caract1"); $VR13 = cleanDataPOST("Caract2"); $VR14 = cleanDataPOST("Fournisseur"); $VR15 = cleanDataPOST("Ref_Fournisseur"); $VR16 = cleanDataPOST("Prix"); $VR17 = cleanDataPOST("QteMini"); $VR18 = cleanDataPOST("CasEmploi1"); $VR19 = cleanDataPOST("CasEmploi2"); $VR20 = cleanDataPOST("CasEmploi3"); $VR21 = cleanDataPOST("CasEmploi4"); $VR22 = cleanDataPOST("CasEmploi5"); $VR23 = cleanDataPOST("CasEmploi6"); // colonne de la table $VR = array ("id"=>$VR0, "REF_MAG"=>$VR1, "FAMILLE_OUTIL"=>$VR2, "SOUS_FAMILLE"=>$VR3, "MATIERE_OUTIL"=>$VR4, "NBRE_Z"=>$VR5, "DIA_1"=>$VR6, "LONGUEUR_1"=>$VR7, "DIA_2"=>$VR8, "DIA_3"=>$VR9, "LONG_UTILE"=>$VR10, "LONG_TOTALE"=>$VR11, "CARACT_1"=>$VR12, "CARACT_2"=>$VR13, "FOURNISSEUR"=>$VR14, "REF_FOURNISSEUR"=>$VR15, "PRIX"=>$VR16, "QTE_MINI"=>$VR17, "CAS_EMPLOI_1"=>$VR18, "CAS_EMPLOI_2"=>$VR19, "CAS_EMPLOI_3"=>$VR20, "CAS_EMPLOI_4"=>$VR21, "CAS_EMPLOI_5"=>$VR22, "CAS_EMPLOI_6"=>$VR23 ); $concat = "" ; $datas = array(); foreach($VR as $VRn => $VRn_value){ if($VRn_value !== ""){ $concat = $concat. " AND ".$VRn. " = :" .$VRn ; $datas[":" .$VRn] = $VRn_value; }; }; $condition = ltrim($concat,"AND"); //--------------------------------------------------------------------------// // REQUETE //--------------------------------------------------------------------------// $sql = 'SELECT id FROM cutting_tools_01 '; $sql .= !empty($condition)? ' WHERE' . $condition : ""; try{ $requete = $connexion->prepare($sql); // A corriger en fonction du contenu de ton fichier cnxbdd.php $requete->execute($datas); $resultat = $requete->fetchAll(PDO::FETCH_ASSOC); }catch(PDOException $e){ echo 'ECHEC : ' .$e->getMessage(); } //--------------------------------------------------------------------------// //on renvoi la réponse au script ajax au format json //--------------------------------------------------------------------------// echo json_encode(array('result'=>$resultat,'sql'=>$sql,'datas'=>$datas));
Donc l' erreur dans le GET en bas de la capture ne te pose pas de problème, je pensais que c'était ça qui qui empêchait de revenir sur ma page html avec le tableau qui devrait s'afficher.
C'est donc autre chose.
Peut être qu'il me manque un retour sur la première page.
C'est donc autre chose.
Peut être qu'il me manque un retour sur la première page.
Bonjour,
En fait, mon navigateur affiche la variable résultat à l'écran, avec dans la barre d'adresse "trouver.php" qui est le programme qui a interrogé la base de donnée et calculé le résultat.
Ce que je veux, c'est que mon tableau html soit mise à jour à l'écran dans la fenêtre précédente hydro_01.
Qu'est ce que j'ai loupé?


En fait, mon navigateur affiche la variable résultat à l'écran, avec dans la barre d'adresse "trouver.php" qui est le programme qui a interrogé la base de donnée et calculé le résultat.
Ce que je veux, c'est que mon tableau html soit mise à jour à l'écran dans la fenêtre précédente hydro_01.
Qu'est ce que j'ai loupé?


Salut Jordane,
je tourne encore en rond sur ce problème. Je dois pas être loin mais je tourne en rond sur cette dernière variable; je n'arrive pas à récupérer la valeur.
Soit y est un null ou undefined.
Capture et code ci dessous.

JC
je tourne encore en rond sur ce problème. Je dois pas être loin mais je tourne en rond sur cette dernière variable; je n'arrive pas à récupérer la valeur.
Soit y est un null ou undefined.
Capture et code ci dessous.

var filtre = { id: idSlctidR, RefMag: idSlctRef_MagR, familleOutil: idSlctFamilleR , SousFamille: idSlctS_FamilleR, Matiere: idSlctMatiereR, Dia1: idInputDia1R, Dia2: idInputDia2R, LongUtile: idInputLongUtileR, Caract1: idInputCaract1R, Fournisseur: idInputFournisseurR, Ref_Fournisseur: idInputRef_FournisseurR, CasEmploi1R: idInputCasEmploi1R, CasEmploi2R: idInputCasEmploi2R }; function creerFiltreSend(obj) { var resultat = ""; for (var i in obj) { if (obj.hasOwnProperty(i) && obj[i]!="" ) { resultat += i + "=" + obj[i] + "&"; } } return resultat; } var filtreSend = creerFiltreSend(filtre); filtreSend = filtreSend.slice(0, filtreSend.length-1); //alert(filtreSend); console.log("On entre dans la fonction validerRecherche"); var xmlhttp ="", resultRecherche = "",x="", idRow ="" ; xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { console.log("Success",xmlhttp); resultRecherche = JSON.parse(this.responseText); if(typeof(resultRecherche)!='undefined' && resultRecherche!=null){ var result = typeof(resultRecherche.result)!='undefined' ? resultRecherche.result : null; if(result!=null){ for (x in result){ console.log('x = ',x); //if (result.hasOwnProperty(x) && result[x]!=""){ var y = result.id[x]; alert ('y = ' + y) idRow = document.getElementById(y); idRow.style.display = 'none'; } } }else{ console.log('no result !'); } }else { console.log(xmlhttp, xmlhttp.status); } }; xmlhttp.open("POST", "trouver.php", true); xmlhttp.onerror = function () { console.log(xmlhttp, xmlhttp.status); alert("Erreur ajax : Regarder la console pour plus de détails !"); }; xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.send(filtreSend); }
JC
Comme je te l'ai indiqué cette question concerne désormais le langage JavaScript.
je t'invite donc à créer une nouvelle discussion propre à ce problème.
je ne vois pas non plus à quoi sert ta variable y....
Regarde le résultat du console.log concernant la variable x.
Je pense que c'est cette valeur qu'il faut utiliser.
je t'invite donc à créer une nouvelle discussion propre à ce problème.
je ne vois pas non plus à quoi sert ta variable y....
Regarde le résultat du console.log concernant la variable x.
Je pense que c'est cette valeur qu'il faut utiliser.