IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Langage PHP Discussion :

Format fenêtre et texte feedback après envoi formulaire


Sujet :

Langage PHP

  1. #1
    Candidat au Club
    Profil pro
    Inscrit en
    Décembre 2004
    Messages
    2
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Décembre 2004
    Messages : 2
    Points : 2
    Points
    2
    Par défaut Format fenêtre et texte feedback après envoi formulaire
    Bonjour,

    J'avance dans mon projet de formulaire php, merci encore à toi "sabotage".

    J'ai cependant encore un problème. En effet, lorsque le formulaire est envoyé une fenêtre apparaît avec un message que j'ai créé, ainsi la personne qui a complété le formulaire est informée que ses données ont bien été transmises. Maintenant, je souhaiterais personnaliser l'aspect de cette fenêtre (dimensions, couleur de fond, police, etc.). Tout d'abord est-ce possible et si oui, je serai preneur de quelques tips.

    Un grand merci d'avance à celles et ceux qui pourront me venir en aide dans ma quête. A toute fin utile, voici le code du formulaire et de la page de traitement.

    Formulaire html:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Document sans nom</title>
    <link href="StyleCSS.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
    <style type="text/css">
    <!--
    .Style2 {
    	color: #000000;
    	font-weight: normal;
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	font-size: 12px;
    }
    .Style4 {
    	color: #006666;
    	font-weight: bold;
    	font-size: 14px;
    }
    .Style6 {font-style: italic; color: #666666;}
    .Style7 {
    	color: #006666;
    	font-weight: bold;
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	font-size: 16px;
    }
    -->
    </style>
    </head>
     
    <body>
    <div id="page">
       <div id="bandeau">
         <script type="text/javascript">
    AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','800','height','100','src','flash/BandeauIdentifierComprendreAgirStatique','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','flash/BandeauIdentifierComprendreAgirStatique' ); //end AC code
    </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="800" height="100">
           <param name="movie" value="flash/BandeauIdentifierComprendreAgirStatique.swf" />
           <param name="quality" value="high" />
           <embed src="flash/BandeauIdentifierComprendreAgirStatique.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="800" height="100"></embed>
         </object>
       </noscript></div>
    <div id="menu">
         <ul>
           <li><a href="index.html">Accueil</a></li>
           <li><a href="formations&amp;seminaires.html">Formations &amp; séminaires</a></li>
           <li><a href="formulaire.html">Vos interlocuteurs</a></li>
           <li><a href="#">Nous contacter</a></li>
           <li><a href="#">Liens</a></li>
         </ul>
       </div>
      <div class="Style2" id="centre">
        <p class="Style7">Vos interlocuteurs</p>
        <form method="POST" action="traitementformulaire.php" name="formulaire">
    <table width="644" border="0" cellpadding="5">
      <tr>
        <td class="Style20"><span class="Style20">Prénom :</span></td>
        <td class="Style20"><span class="Style20">
          <input type="text" name="prenom"/>
        </span></td>
      </tr>
      <tr>
        <td class="Style20"><span class="Style20">Nom :</span></td>
        <td class="Style20"><input type="text" name="nom"/></td>
      </tr>
      <tr>
        <td class="Style20"><span class="Style17"><span class="Style21">Adresse e-mail :</span></td>
        <td class="Style20"><span class="Style18"><input type="text" name="mail"/></span></td>
      </tr>
      <tr>
        <td class="Style20">Liste déroulante :</td>
        <td class="Style20"><select name="liste">    <option value="Choix 1">Choix 1    <option value="Choix 2">Choix 2    <option value="Choix 3">Choix 3</select></td>
      </tr>
      <tr>
        <td class="Style20">Cases à cocher :</td>
        <td class="Style20"><input type="checkbox" name="CHOIX" value="CASE 1"> CASE 1<br><input type="checkbox" name="CHOIX" value="CASE 2"> CASE 2<br><input type="checkbox" name="CHOIX" value="CASE 3"> CASE 3<br></td>
      </tr>
      <tr>
        <td class="Style20">Boutons radio:</td>
        <td class="Style20"><input type="radio" name="CHOX" value="Bouton 1"> Bouton 1<br><input type="radio" name="CHOX" value="Bouton 2"> Bouton 2<br><input type="radio" name="CHOX" value="Bouton 3" checked> Bouton 3<br></td>
      </tr>
      <tr valign="top">
        <td class="Style20"><span class="Style20">Commentaire :
        </span>  <span class="Style20"></br>
        </span></td>
        <td class="Style20"><span class="Style18"></span><span class="Style20">
          <textarea name="commentaire" cols="60" rows="8"></textarea>
        </span></td>
      </tr>
    </table>
    <p>
    <!-- Bouton envoyer-->
    <input type="submit" value="Envoyer">
     
    <!-- Bouton annuler-->
    <input type="reset" value="Annuler">
    </form>
    <br/>
    <br/></p>
      </div>
      <div id="pied">
        <div align="right">Copyright, MVT, juillet 2008</div>
      </div>
    </div>         
     
    </body>
    </html>
    Traitement formulaire
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Traitement formulaire</title>
    </head>
     
    <body>
    <?php 
    $Mail = $_POST['mail'];
    $Nom = $_POST['nom'];
    $Prenom = $_POST['prenom'];
    $Liste = $_POST['liste'];
    $Choix = $_POST['CHOIX'];
    $Chox = $_POST['CHOX'];
    $Commentaire = $_POST['commentaire'];
     
    if(!empty($Mail) && !empty($Prenom) && !empty($Nom) ){
     
      $Commentaire = htmlentities($Commentaire);
     
     
      $index = "$Prenom\n $Nom\n vous contact via votre formulaire de demande de renseinements MVTR.\n \n Mail: $Mail\n Liste: $Liste\n Choix: $Choix\n Chox: $Chox\n message : \n $Commentaire";
     
     
      if( mail('philippe.zin@phzi.ch','Demande de renseignements MVTR',$index) ){
        echo'<font face="verdana"><p>Merci,<br />
      <br />
      Votre formulaire nous est bien parvenu.
      <br>
      Le cas échéant, nous ne manquerons pas de vous rendre réponse ou de prendre contact avec vous<br />
      dans les plus brefs délais<br>
      Avec nos meilleurs messages<br />
      ______________________________</p>
    <blockquote>
      <blockquote>    Team MVT    </blockquote>
    </blockquote>
    <input type="" value="Envoyer">
    </font face>';
      }
      else{
        echo 'une erreur est survenu lors de l\'envoi du message';
      }
    }
      else{
     
        echo 'Veuillez compléter les champs nom, prenom et mail, merci';
    }
     
    ?>
    </body>
    </html>

  2. #2
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Points : 44 155
    Points
    44 155
    Par défaut
    Dans le cas ok tu ouvres un popup en javascript :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    <script langage="javascript">
    window.open("popup.html","PopUp","width=500,height=350,location=no,status=no,toolbar=no,scrollbars=no");
    </script>
    popup.html :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">
    <head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <style type="text/css">
    .popup {
    	background-color : #59848F;
    	color : #484727;
    	font-family: arial;
    }
    </style>
    <title>Merki !</title>
    <body>
    <div class="popup">
     
    Votre formulaire nous est bien parvenu.
      <br>
      Le cas échéant, nous ne manquerons pas de vous rendre réponse ou de prendre contact avec vous<br />
      dans les plus brefs délais<br>
      Avec nos meilleurs messages<br />
      ______________________________</p>
     
      <blockquote>    Team MVT    </blockquote>
     
    </div>
    </body>
    </html>

Discussions similaires

  1. [MySQL] Problème de requête après envoie formulaire
    Par benjamin002 dans le forum PHP & Base de données
    Réponses: 1
    Dernier message: 07/03/2011, 16h37
  2. Charger une page après envoi formulaire
    Par JeanMi66 dans le forum Langage
    Réponses: 5
    Dernier message: 05/03/2010, 07h49
  3. Réponses: 1
    Dernier message: 26/09/2007, 00h08
  4. Champs textes disabled et envoi formulaire
    Par nerick dans le forum Langage
    Réponses: 6
    Dernier message: 09/01/2006, 13h52
  5. après envois formulaire execute procedure
    Par alexmorel dans le forum Général JavaScript
    Réponses: 3
    Dernier message: 22/12/2005, 22h54

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo