Jump to content

yao

Members
  • Posts

    2
  • Joined

  • Last visited

yao's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Bonjour w3schools, je suis bloqué sur une idée de script en PHP que voici.j'ai besoin d'aide SVP!. j'ai une liste déroulante qui se présente comme ceci. <div class="row"> <div class="form-group col-xs-3 col-md-3 col-lg-3 " style="padding-top:75px;"> <h6 class="d-flex justify-content-center">type de notification</h6> <select class="form-control" name="" required> <option value="">-</option> <option value="">SMS</option> <option value="">MAIL</option> <option value="">Tous</option> </select> </div> </div> L'idée est que lorsque je click sur une option par exemple SMS, le script me permettra d'avoir liste de choix de numéro de téléphone par une requête sql et lorsque je choisis un numéro; il s'affiche dans la liste déroulante . j'aimerai bien que cela soit en php. merci j'ai acte de voir une réponse.
  2. /* insertion des donnees dans la base de donnee resultats*/ if(isset($_POST["submit"])) { $nom_prenom_contact=$_POST["id_contact"]; $statut_resultat=$_POST["statut_resultat"]; $date_resultat=$_POST["date_resultat"]; $examen_resultat=implode(',',$_POST["examen_resultat"]); if(!empty($_POST["id_contact"]) AND !empty($_POST["statut_resultat"]) AND empty($_POST["date_resultat"]) AND !empty($_POST["examen_resultat"])) { $requete=$pdo->prepare('INSERT INTO resultats VALUES(null, :statut_resultat, :date_resultat, :examen_resultat, :id_contact)'); $requete->bindValue(':statut_resultat',$statut_resultat,PDO::PARAM_STR); $requete->bindValue(':date_resultat',$date_resultat,PDO::PARAM_STR); $requete->bindValue(':examen_resultat',$examen_resultat, PDO::PARAM_STR); $requete->bindValue(':id_contact',$nom_prenom_contact,PDO::PARAM_INT); $veribien=$requete->execute(); if ($veribien) { $error='<label style="color:red; text-align:center; font-family:Liberation serif;">votre requete est enregistre!</label>'; } else { $error='<label style="color:red; text-align:center; font-family:Liberation serif;">votre requete à été rejetté </label>'; } } else { $message='<label style="color:red; text-align:center; font-family:Liberation serif;">Tous les champs sont obligatoire!</label>'; } } ?> <!DOCTYPE html> <html lang="en" dir="ltr"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title></title> <link type="text/css" rel="stylesheet" href="../css/resultat.css"> <link type="text/css" rel="stylesheet" href="../css/bootstrap.min.css"> </head> <body class="body"> <script type="text/javascript" src="../js/bootstrap.bundle.min.js"></script> <script type="text/javascript" src="../js/jquery-3.4.0.min.js"></script> <!--partie entete --> <div class="container-fluid entete"> <div class="row"> <div class="col-xs-4 col-md-4 col-lg-4"> </div> <div class="col-xs-4 col-md-4 col-lg-4 "> <div class="d-flex justify-content-center"> <img src="images/titre.png" alt="titre de la page" height="40" width="200" class=""> </div> </div> <div class="col-xs-4 col-md-4 col-lg-4"> <a href="index.php?page=listeresultat" class="d-flex justify-content-end"><button type="submit" name="button" class="btn btn-primary" style="border-radius:50px;">Retour</button></a> <br> <?php if($message) { echo'<label class="d-flex justify-content-end">'.$message.'</label>'; } ?> </div> </div> </div> <!-- bloc formulaire --> <div class="container-fluid"> <div class= " row"> <div class="col-xs-3 col-md-3 col-lg-3" style="padding-top:10px;"> <h6 class="d-flex justify-content-end" >Patients:</h6> <h6 class="d-flex justify-content-end" style="padding-top:34px;">Statuts:</h6> <h6 class="d-flex justify-content-end" style="padding-top:34px;">date resultat:</h6> </div> <form class="" action="" method="POST"> <div class="form-group"> <select class="form-control" name="id_contact" required> <?php foreach ($connection as $key => $diffnom):?> <option value="<?php echo $diffnom['id_contact'];?>"><?php echo $diffnom['nom_prenom_contact'];?></option> <?php endforeach?> </select> <br> <select class="form-control" name="statut_resultat" required> <option value="non envoye">Non envoyé</option> <option value="envoye">Envoyé</option> </select> <br> <input type="date" name="date_resultat" class="form-control" required> </div> <br> <!-- partie des examens nous avons donne une dimension a notre div--> <div class="" style="overflow:auto;height:250px;"> <h4 class="d-flex justify-content-center partietitre">EXAMENS</h4> <br> <h6 class="d-flex justify-content-center">CYTOLOGIE/HEMATOLOGIE</h6> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="NUMERATION FORMUME SANGUINE NFS"> <label for="NUMERATION FORMUME SANGUINE NFS">NUMERATION FORMUME SANGUINE NFS</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="VITESSE DE SEDIMENTATION"> <label for="VITESSE DE SEDIMENTATION">VITESSE DE SEDIMENTATION</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="RECERCHE DE PLASMODIUM (QBC/GE)"> <label for="RECERCHE DE PLASMODIUM (QBC/GE)">RECERCHE DE PLASMODIUM (QBC/GE)</label> </div> <h6 class="d-flex justify-content-center">IMMUNOHEMATOLOGIE</h6> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="GROUPE ABO/RHESUS (GRH)"> <label for="GROUPE ABO/RHESUS (GRH)">GROUPE ABO/RHESUS (GRH)</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="Coombs direct(COOD)"> <label for="coombs direct(COOD)">Coombs direct(COOD)</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="DEPISTAGE DES ANTICORPS IRREGULIERS: Coombs indirect (papaine+saline) R A I"> <label for="DEPISTAGE DES ANTICORPS IRREGULIERS">DEPISTAGE DES ANTICORPS IRREGULIERS: Coombs indirect (papaine+saline) R A I</label> </div> <h6 class="d-flex justify-content-center">EXPLORATION DE L'HEMOSTASE</h6> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="TEMPS DE SAINGNEMENT"> <label for="TEMPS DE SAINGNEMENT">TEMPS DE SAINGNEMENT</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="TAUX DE PROTHROMBINE(temps de quick)"> <label for="TAUX DE PROTHROMBINE">TAUX DE PROTHROMBINE(temps de quick)</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="TEMPS DE CEPHALINE ACTIVEE"> <label for="TEMPS DE CEPHALINE ACTIVEE">TEMPS DE CEPHALINE ACTIVEE</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="DOSAGE DU FIBRINOGENE"> <label for="DOSAGE DU FIBRINOGENEDOSAGE DU FIBRINOGENE">DOSAGE DU FIBRINOGENE</label> </div> <h6 class="d-flex justify-content-center">CHIMIE HEMATOLOGIE</h6> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="ELECTROPHORESE DE L'HEMOGLOBINE"> <label for="ELECTROPHORESE DE L'HEMOGLOBINE">ELECTROPHORESE DE L'HEMOGLOBINE</label> </div> <h6 class="d-flex justify-content-center">BACTERIOLOGIE</h6> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="PRELEVEMENT VAGINAL +MYCOPLASME"> <label for="PRELEVEMENT VAGINAL +MYCOPLASME">PRELEVEMENT VAGINAL +MYCOPLASME</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="PRELEVEMENT URETRAL MYCOPLASME"> <label for="PRELEVEMENT URETRAL MYCOPLASME">PRELEVEMENT URETRAL MYCOPLASME</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="COPROCULTURE"> <label for="COPROCULTURE">COPROCULTURE</label> </div> <h6 class="d-flex justify-content-center">SEROLOGIE</h6> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="SALMONELLOSES (felix widal )"> <label for="SALMONELLOSES (felix widal )">SALMONELLOSES (felix widal )</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="RUBEOLE IgG (titrage)"> <label for="RUBEOLE IgG (titrage)">RUBEOLE IgG (titrage)</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat" value="RUBEOLE IgM"> <label for="RUBEOLE IgM">RUBEOLE IgM</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="SYPHILIS (VDRL + TPHA ) qualitative"> <label for="SYPHILIS (VDRL + TPHA ) qualitative IgM">SYPHILIS (VDRL + TPHA ) qualitative</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="SYPHILIS ( VDRL + TPHA ) quantitative"> <label for="SYPHILIS ( VDRL + TPHA ) quantitative">SYPHILIS ( VDRL + TPHA ) quantitative</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="TOXOPLASMOSE ( IgM + IgG)"> <label for="TOXOPLASMOSE ( IgM + IgG)">TOXOPLASMOSE ( IgM + IgG)</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="VIH1 + VIH2 + ANTICORPS (dépistage) (HIV)"> <label for="VIH1 + VIH2 + ANTICORPS (dépistage) (HIV)">VIH1 + VIH2 + ANTICORPS (dépistage) (HIV)</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="MARQUEURS HEPATITE B AgHBS"> <label for="MARQUEURS HEPATITE B AgHBS">MARQUEURS HEPATITE B AgHBS</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="MARQUEURS HEPATITE B ANTICORPS ANTI-HBS (titrage)"> <label for="MARQUEURS HEPATITE B ANTICORPS ANTI-HBS (titrage)">MARQUEURS HEPATITE B ANTICORPS ANTI-HBS (titrage)</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="MARQUEURS HEPATITE B ANTICORPS ANTI-HBC TOTAUX"> <label for="MARQUEURS HEPATITE B ANTICORPS ANTI-HBC TOTAUX">MARQUEURS HEPATITE B ANTICORPS ANTI-HBC TOTAUX</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="SEROLOGIE CYTOMEGALOVIRUS IgG"> <label for="SEROLOGIE CYTOMEGALOVIRUS IgG">SEROLOGIE CYTOMEGALOVIRUS IgG</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="COPROCULTURE"> <label for="COPROCULTURE">COPROCULTURE</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="SEROLOGIE CYTOMEGALOVIRUS IgM"> <label for="SEROLOGIE CYTOMEGALOVIRUS IgM">SEROLOGIE CYTOMEGALOVIRUS IgM</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="SEROLOGIE MYCOPLASME HOMINIS"> <label for="SEROLOGIE MYCOPLASME HOMINIS">SEROLOGIE MYCOPLASME HOMINIS</label> </div> <h6 class="d-flex justify-content-center">PROTEINES SPECIFIQUES</h6> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="HEMOGLOBINE GLYQUEE ( HBAIC )"> <label for="HEMOGLOBINE GLYQUEE ( HBAIC )">HEMOGLOBINE GLYQUEE ( HBAIC )</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="MARQUEURS TUMORAUX"> <label for="CRP">CRP</label> </div> <h6 class="d-flex justify-content-center">MARQUEURS TUMORAUX</h6> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="GE"> <label for="GE">GE</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="BETA - HCG ( HCG)"> <label for="BETA - HCG ( HCG)">BETA - HCG ( HCG)</label> </div> <h6 class="d-flex justify-content-center"> ENZYMES</h6> <div class="form-group"> <input type="checkbox" id="examen_resultat " name="examen_resultat[]" value="TRASAMINASES"> <label for="TRASAMINASES ">TRASAMINASES </label> </div> <h6 class="d-flex justify-content-center"> SUBSTRATS</h6> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="UREE"> <label for="UREE">UREE</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="GLYCEMIE"> <label for="GLYCEMIE">GLYCEMIE</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="GLYCEMIE POSTPANDIALE"> <label for="GLYCEMIE POSTPANDIALE">GLYCEMIE POSTPANDIALE</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="CRETININE"> <label for="CRETININE">CRETININE</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="ACIDE UNIQUE"> <label for="ACIDE UNIQUE">ACIDE UNIQUE</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="CHOLESTEROL TOTAL"> <label for="CHOLESTEROL TOTAL">CHOLESTEROL TOTAL</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="CHOLESTEROL HDL"> <label for="CHOLESTEROL HDL">CHOLESTEROL HDL</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="CHOLESTEROL TOTAL + HDL + LDLE"> <label for="CHOLESTEROL TOTAL + HDL + LDL">CHOLESTEROL TOTAL + HDL + LDLE</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="PROTEINE TOTALE"> <label for="PROTEINE TOTALE">PROTEINE TOTALE</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="TRIGLYCERIDE"> <label for="TRIGLYCERIDE">TRIGLYCERIDE</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="ELECTROPHORESE DE PROTEINES"> <label for="ELECTROPHORESE DE PROTEINES">ELECTROPHORESE DE PROTEINES</label> </div> <h6 class="d-flex justify-content-center">ELECTROLYTES</h6> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="CALCIUM"> <label for="CALCIUM">CALCIUM</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat" value="MAGNESIUM"> <label for="MAGNESIUM">MAGNESIUM</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="IONOGRAMME"> <label for="IONOGRAMME">IONOGRAMME</label> </div> <h6 class="d-flex justify-content-center"> EPREUVES FONCTIONNELLES</h6> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="TEST D'O' SULLIVAN"> <label for="TEST D'O' SULLIVAN">TEST D'O' SULLIVAN</label> </div> <h6 class="d-flex justify-content-center">URINE DE MICTION</h6> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="LEUCOCYTES"> <label for="LEUCOCYTES">LEUCOCYTES</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="GLUCOSE"> <label for="GLUCOSE">GLUCOSE</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat" value="PROTEINE"> <label for="PROTEINE">PROTEINE</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="NITRITES"> <label for="NITRITES">NITRITES</label> </div> <h6 class="d-flex justify-content-center">TEST DE GROSSESSE(HCG urine)</h6> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="TEST DE GROSSESSE(HCG urine)"> <label for="HCG PLASMATIQUE ( HCG )">HCG PLASMATIQUE ( HCG )</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="LH PLASMATIQUE (LH)"> <label for="LH PLASMATIQUE (LH)">LH PLASMATIQUE (LH)</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="FSH PLASMATIQUE (FSH)"> <label for="FSH PLASMATIQUE (FSH)">FSH PLASMATIQUE (FSH)</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="ESTRADIOL PLASMATIQUE (E2)"> <label for="ESTRADIOL PLASMATIQUE (E2)">ESTRADIOL PLASMATIQUE (E2)</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="PROLACTINE"> <label for="PROLACTINE">PROLACTINE</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="T3 LIBRE"> <label for="T3 LIBRE">T3 LIBRE</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="T4 LIBRE"> <label for="T4 LIBRE">T4 LIBRE</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="TSH us (TSH)"> <label for="TSH us (TSH)">TSH us (TSH)</label> </div> <div class="form-group"> <input type="checkbox" id="examen_resultat" name="examen_resultat[]" value="AMH (hormone antimullerienne)"> <label for="AMH (hormone antimullerienne)">AMH (hormone antimullerienne)</label> </div> <!--fin --> </div> <br> <button type="submit" id="submit" name="submit" value="VALIDER" class="btn btn-primary">VALIDER</button> </form> </div> <div class="col-xs-3 col-md-3 col-lg-3" > </div> </div> </div> </body> </html> bonjour w3schools, j'ai un problème avec mon scripte php. en fait, je veux insérer les données de ma liste déroulante et celles de la case à cocher dans ma base de données que voici ) et la table résultats font référence à ma table contacts (id_contact nom_prenom_contact numero_contact email_contact groupe_contact) j'ai essayé mais pas de résultat satisfaisant. j'ai besoin de votre aide svp voici tout mon code
×
×
  • Create New...