Php affichage des variables

Résolu
Bonjour, à tous voila , j' ai résolu mon soucis pour envoyer les données d'un formulaire à lusieures personnes

mais j' ai encore des variables qui s'affichent sur la page de remerciement ( bouton radio ) , comment puis-je ne pas les afficher

de plus le second mail recois les mêmes informations que le premier , comment puis-je faire pour que le second mail de recoive qu'une simple phrase du style ( merci , nous vous confirmons votre prise de rdv" ?

merci à tous
Configuration: Windows XP Internet Explorer 6.0

10 réponses

  • Votes
  • Date
  • Date décroissante
  1. Salut,
    Je pense que tu devrais copier coller le code de ta page, car là ce n'est pas très parlant...
    1. re

      pour les mails différents : envoyer deux mails distincts (l'un après l'autre)

      pour les variables : je relis ton post précédent (celui résolu)
      1. ya que la fin du code dans ton post... c'est pas évident de deviner ce que t'as écrit.
        a+
        1. voila le fin de mon code qui fonctionne impeccablement

          $msg .= "Message:\t$message\n\n";

          $recipient .= "(moi@yahoo.fr)";
          $subject .= "Contact Formulaire ";
          $mailheaders .= "From: www.monsite.fr <> \n";
          $mailheaders .= "Reply-To: $sender_email\n";
          $mailheaders .= "Cc: ".$sender_email."\n";
          mail($recipient, $subject, $msg, $mailheaders);
          echo "<HTML><HEAD>";
          echo "<TITLE>Formulaire - Remerciement!</TITLE></HEAD><BODY background='fond_beige.jpg'>";
          echo "<br><br><br><H1 align=center>Merci, $sender_name</H1>";
          echo "<P align=center>";
          echo "Vos informations nous ont été transmises , nous vous contacterons dans les plus brefs délai.</P>";
          echo "<center>Vous allez recevoir d'ici quelques minutes le récapitulatif des informations saisies dans votre boite mail.</P>";
          echo "<br><center>Toute l'équipe de l'entreprise xxxxxx vous souhaite une excellente continuation , n'hésitez pas à nous contacter , nous serons ravis de répondre à toutes vos questions.</P>";
          echo "05 56 00 00 00.</P>";
          echo "<a href='javascript:window.history.go(-1)'><br><br><center>Retour au formulaire</a> ";
          echo "</BODY></HTML>";

          ?>
          1. re

            après mail($recipient, $subject, $msg, $mailheaders); balance juste mail($autrerecipient, $subject, $autremsg, $mailheaders);

            pour tes variables qui s'affichent en hut, j'abandonne? je laisse le plaisir aux autres d'essayer de te dépatouiller
            1. je vois donc du style................

              $msg .= "Message:\t$message\n\n";

              $recipient .= "(moi@yahoo.fr)";
              $subject .= "Contact Formulaire ";
              $mailheaders .= "From: www.monsite.fr <> \n";
              $mailheaders .= "Reply-To: $sender_email\n";
              mail($recipient, $subject, $msg, $mailheaders);

              $mailheaders .= "Cc: ".$sender_email."\n";
              $subject2 .= "Confirmation d'envoi";
              $autremsg . =" Nous avons bien pris en compte votre demande";
              ($autrerecipient, $subject2, $autremsg, $mailheaders);

              ???????
              1. mais dans ce cas , $autrerecipient n' a pas été défini puis qu'il y a le Cc ????????????????
                1. niet aucune de mes facons de faire ne fonctionneent , voir je ne recois plus rien
                  1. si ca peut vous aider , voivi mon code complet qui fonctionne mais envoie els mêmes informations aux 2 mails

                    <?php

                    if ($sender_choix=="choix1")
                    $msg .= "civilite : Monsieur\t\n";
                    if ($sender_choix=="choix2")
                    $msg .= "civilite : Madame\t\n";
                    if ($sender_choix=="choix3")
                    $msg .= "civilite : Mademoiselle\t\n";
                    echo $_POST['sender_choix'];
                    echo $_POST['$sender_choix'];

                    $msg .= "Nom/Prénom:\t$sender_name\n";

                    $msg .= "E_mail:\t$sender_email\n";

                    $msg .= "numéros de tel:\t$sender_phone\n";

                    $msg .= "Adresse:\t$sender_adresse\n";

                    if ($sender_be=="Particulier")
                    $msg .= "status du client : particulier\t\n";
                    if ($sender_be=="entreprise")
                    $msg .= "status du client : entreprise\t\n";
                    echo $_POST['sender_be'];
                    echo $_POST['$sender_be'];

                    if ($sender_projet=="choix4")
                    $msg .= "Date prévu des travaux : Immediat\t\n";
                    if ($sender_projet=="choix5")
                    $msg .= "Date prévu des travaux : 1 a 3 mois\t\n";
                    if ($sender_projet=="choix6")
                    $msg .= "Date prévu des travaux : 3 a 6 mois\t\n";
                    if ($sender_projet=="choix7")
                    $msg .= "Date prévu des travaux : Plus de 6 mois\t\n";
                    echo $_POST['sender_projet'];
                    echo $_POST['$sender_projet'];

                    if ($sender_maison=="principale")
                    $msg .= "Résidence principale\t\n";
                    if ($sender_maison=="secondaire")
                    $msg .= "Residence secondaire\t\n";
                    echo $_POST['sender_maison'];
                    echo $_POST['$sender_maison'];
                    $msg .= "Date de construction :\t$sender_construction\n";

                    if ($sender_type=="choix9")
                    $msg .= "Type de batiment : Maison individuelle\t\n";
                    if ($sender_type=="choix10")
                    $msg .= "Type de batiment : Immeuble\t\n";

                    if ($sender_type=="choix11")
                    $msg .= "Type de batiment : Local professionnel\t\n";
                    if ($sender_type=="choix12")
                    $msg .= "Type de batiment : Hangar\t\n";
                    if ($sender_type=="choix13")
                    $msg .= "Type de batiment : Garage\t\n";
                    if ($sender_type=="choix14")
                    $msg .= "Type de batiment : Batiment public\t\n";
                    echo $_POST['sender_type'];
                    echo $_POST['$sender_type'];

                    if ($sender_orientation=="choix15")
                    $msg .= "Orientation du toit : Nord\t\n";
                    if ($sender_orientation=="choix16")
                    $msg .= "Orientation du toit : Nord-Est\t\n";
                    if ($sender_orientation=="choix17")
                    $msg .= "Orientation du toit : Est\t\n";
                    if ($sender_orientation=="choix18")
                    $msg .= "Orientation du toit : Sud-Est\t\n";
                    if ($sender_orientation=="choix19")
                    $msg .= "Orientation du toit : Sud\t\n";
                    if ($sender_orientation=="choix20")
                    $msg .= "Orientation du toit : Sud-Ouest\t\n";
                    if ($sender_orientation=="choix21")
                    $msg .= "Orientation du toit : Ouest\t\n";
                    if ($sender_orientationt=="choix22")
                    $msg .= "Orientation du toit : Nord-Ouest\t\n";
                    echo $_POST['sender_orientation'];
                    echo $_POST['$sender_orientation'];

                    $msg .= "Inclinaison du toit :\t$sender_inclinaison\n";

                    $msg .= "Surface dispo en logueur sur le toit ( m ):\t$sender_longueurtoit\n";
                    $msg .= "Surface dispo en largeur sur le toit ( m ) :\t$sender_largeurtoit\n";

                    $msg .= "Surface en m² :\t$sender_surface\n";

                    if ($sender_typetoiture=="choix23")
                    $msg .= "Type de toiture : Tuile mecanique\t\n";
                    if ($sender_typetoiture=="choix24")
                    $msg .= "Type de toiture : Tuile plate\t\n";
                    if ($sender_typetoiture=="choix25")
                    $msg .= "Orientation du toit : Tuile canal\t\n";
                    if ($sender_typetoiture=="choix26")
                    $msg .= "Type de toiture : Fibrociment\t\n";
                    if ($sender_typetoiture=="choix27")
                    $msg .= "Type de toiture : Ardoise\t\n";
                    if ($sender_typetoiture=="choix28")
                    $msg .= "Type de toiture : Bac acier\t\n";
                    if ($sender_typetoiture=="choix29")
                    $msg .= "Type de toiture : Terrasse\t\n";
                    if ($sender_typetoiture=="choix30")
                    $msg .= "Type de toiture : Autre\t\n";
                    echo $_POST['sender_typetoiture'];
                    echo $_POST['$sender_typetoiture'];

                    $msg .= "Autre :\t$sender_autre1\n";

                    $msg .= "Type de Charpente :\t$sender_typecharpente\n";

                    if ($sender_typecharpente=="choix31")
                    $msg .= "Type de Charpente : Bois\t\n";
                    if ($sender_typecharpente=="choix32")
                    $msg .= "Type de Charpente : Metal\t\n";
                    echo $_POST['sender_typecharpente'];
                    echo $_POST['$sender_typecharpente'];

                    $msg .= "Hauuteur du toit ( mètre ) :\t$sender_hauteur\n";

                    if ($sender_senscharpente=="choix33")
                    $msg .= "Sens de la Charpente : Horizontal\t\n";
                    if ($sender_senscharpente=="choix34")
                    $msg .= "Sens de la Charpente : Vertical\t\n";
                    if ($sender_senscharpente=="choix35")
                    $msg .= "Sens de la Charpente : Ne sais pas\t\n";
                    echo $_POST['sender_senscharpente'];
                    echo $_POST['$sender_senscharpente'];

                    $msg .= "Ecartement des Chevrons ( en cm ) :\t$sender_chevron\n";

                    if ($sender_ventilation=="choix36")
                    $msg .= "Ventilation du toit : Oui\t\n";
                    if ($sender_ventilation=="choix37")
                    $msg .= "Ventilation du toit : Non\t\n";
                    echo $_POST['sender_ventilation'];
                    echo $_POST['$sender_ventilation'];

                    if ($sender_Paratonnerre=="choix38")
                    $msg .= "Paratonnerre existant : Oui\t\n";
                    if ($sender_Paratonnerre=="choix39")
                    $msg .= "Paratonnerre existant : Non\t\n";
                    echo $_POST['sender_Paratonnerre'];
                    echo $_POST['$sender_Paratonnerre'];

                    if ($sender_priseterre=="choix40")
                    $msg .= "Prise de terre sur le(s) batiment(s) : Oui\t\n";
                    if ($sender_priseterre=="choix41")
                    $msg .= "Prise de terre sur le(s) batiment(s) : Non\t\n";
                    echo $_POST['sender_priseterre'];
                    echo $_POST['$sender_priseterre'];

                    $msg .= "Consommation EDF /an ( kWH ) :\t$sender_edf\n";

                    $msg .= "Distance entre le(s) toit(s) et le compteur approximatif ( en m ) :\t$sender_distance\n";

                    $msg .= "Puissance souhaitee ( kWc ) :\t$sender_puissance\n";

                    $msg .= "Budget envisagé ( € ) :\t$sender_budget\n";

                    $msg .= "Message:\t$message\n\n";

                    $recipient .= "moi@live.fr";
                    $subject .= "Contact Formulaire";
                    $mailheaders .= "From: My Web Site <> \n";
                    $mailheaders .= "Reply-To: $sender_email\n";
                    $mailheaders .= "Cc: ".$sender_email."\n";
                    mail($recipient, $subject, $msg, $mailheaders);

                    echo "<HTML><HEAD>";
                    echo "<TITLE>Formulaire - Remerciement!</TITLE></HEAD><BODY background='fond_beige.jpg'>";
                    echo "<br><br><br><H1 align=center>Merci, $sender_name</H1>";
                    echo "<P align=center>";
                    echo "Vos informations nous ont été transmises , nous vous contacterons dans les plus brefs délai.</P>";
                    echo "<br><center>Toute l'équipe de l'entreprise xxxxx vous souhaite une excellente continuation.</P>";
                    echo "<a href='javascript:window.history.go(-1)'><br><br><center>Retour au formulaire</a> ";
                    echo "</BODY></HTML>";

                    ?>
                    1. bon ok , la le second maisl recoit bien la phrase que je veux mais maintenant c moi qui ne recois plus rien .................. GRRRRRRRRRRRRRRRR

                      voici le nouveau code

                      $msg .= "Message:\t$message\n\n";
                      $autremsg .=" Nous avons bien pris en compte votre demande<br>Pour de plus amples informations , n'hésitez pas à nous contacter<br>
                      05 56 00 00 00 ou par mail contact@moi.fr";

                      $recipient .= "(moi@live.fr)";
                      $recipient2 .= ".$sender_email.";
                      $subject .= "Contact Formulaire ";
                      $subject2 .= "Confirmation d'envoi";
                      $mailheaders .= "From: www.moi.fr <> \n";
                      $mailheaders .= "Cc: ".$sender_email."\n";
                      mail($recipient, $subject, $msg, $mailheaders);
                      mail($recipient2, $subject2, $autremsg, $mailheaders);

                      echo "<HTML><HEAD>";
                      echo "<TITLE>Formulaire - Remerciement!</TITLE></HEAD><BODY background='fond_beige.jpg'>";
                      echo "<br><br><br><H1 align=center>Merci, $sender_name</H1>";
                      echo "<P align=center>";
                      echo "Vos informations nous ont été transmises , nous vous contacterons dans les plus brefs délai.</P>";
                      echo "<center>Vous allez recevoir d'ici quelques minutes le récapitulatif des informations saisies dans votre boite mail.</P>";
                      echo "<br><center>Toute l'équipe de l'entreprise hhhhh vous souhaite une excellente continuation , n'hésitez pas à nous contacter , nous serons ravis de répondre à toutes vos questions.</P>";
                      echo "05 56 00 00 00.</P>";
                      echo "<a href='javascript:window.history.go(-1)'><br><br><center>Retour au formulaire</a> ";
                      echo "</BODY></HTML>";

                      ?>