Bonsoir,
Je n'arrive pas à faire revenir sur ma page d'accueil apres avoir validé le bouton envoyer. Quelqu'un pourrait m'aider ? Merci d'avance.
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 <?php //init des variables if (!isset($HTTP_POST_VARS['BSubmit'])) $HTTP_POST_VARS['BSubmit']=""; if (!isset($erreurlog)) $erreurlog=0; ?> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="blstyle.css" rel="stylesheet" type="text/css"> </head> <body class="sub"> <form name="form1" method="post" action=""> <div align="left"></div> <table width="81%" border="0" cellpadding="8"> <tr> <td colspan="3" class="HeaderColor"> <h4 align="center"><span style="mso-bidi-font-size: 12.0pt"><span class="MF_Style_2"><font color="#007FFF" face="Comic Sans MS" size="3">Formulaire d'inscription</font></span></span></h4></td> </tr> <tr style="vertical-align: top"> <td width="23%" nowrap class="LabelColor" style="text-align: right"><label for="username" class="Texte"> Nom et Prénom </label></td> <td class="TitleColor"> <input name="CNom" type="text" class="Texte_Gras" id="IdNom" value="Nom" size="30"></td> <td class="TitleColor"><input name="CPrenom" type="text" class="Texte_Gras" id="IdPrenom" value="Prénom" size="30"></td> </tr> <tr style="vertical-align: top"> <td style="text-align: right" class="LabelColor"><label for="password" class="Texte"> Adresse 1 </label></td> <td colspan="2" class="TitleColor"> <input name="CAddr1" type="text" class="Texte_Gras" id="IdAddr1" value="Adresse 1ère partie" size="70"></td> </tr> <tr style="vertical-align: top"> <td style="text-align: right" class="LabelColor"><label for="confirmpassword" class="Texte"> Adresse 2 </label></td> <td colspan="2" class="TitleColor"> <input name="CAddr2" type="text" class="Texte_Gras" id="IdAddr2" value="Adresse 2ème partie" size="70"> </td> </tr> <tr style="vertical-align: top"> <td style="text-align: right" class="Texte"> Code Postal et Ville </td> <td width="31%" class="TitleColor"> <label for="first"></label> <input name="CCode" type="text" class="Texte_Gras" id="IdCode" value="Code" size="5" maxlength="5"> </td> <td width="46%" class="TitleColor"> <label for="last"></label> <input name="CVille" type="text" class="Texte_Gras" id="IdVille" value="Ville" size="30"> </td> </tr> <tr style="vertical-align: top"> <td style="text-align: right" class="LabelColor"><label for="email" class="Texte"> Email</label></td> <td colspan="2" class="TitleColor"> <input name="CEmail" type="text" class="Texte_Gras" id="IdEmail" value="Email" size="50"> </td> </tr> <tr style="vertical-align: top"> <td style="text-align: right" class="Texte"> Civilité</td> <td colspan="2"> <p class="Texte"> <label for="monsieur">Monsieur</label><input name="RBMrMmeMelle" type="radio" id="monsieur" value="Monsieur" checked> <label for="madame"> Madame</label><input name="RBMrMmeMelle" type="radio" id="madame" value="Madame"> <label for="mademoiselle"> Mademoiselle </label><input name="RBMrMmeMelle" type="radio" id="mademoiselle" value="Mademoiselle"> </p></td> </tr> <tr style="vertical-align: top"> <td colspan="3"> <pre class="Texte">Versement d'acompte : Oui <input name="RBOuiNon" type="radio" id="yes1" value="Oui" checked> N<label for="no1">on</label><input type="radio" id="no1" name="RBOuiNon" value="Non"> </pre> </td> </tr> <tr style="vertical-align: top" class="FooterColor"> <td colspan="3"><div align="center"> <input name="BSubmit" type="submit" class="Texte_Gras" id="BSubmit" value="Envoyer"> </div></td> </tr> </table> </form> <?php if ($HTTP_POST_VARS['BSubmit']=="Envoyer") { $whbh_mail_to="gcharniere@yahoo.fr"; $whbh_mail_text = $_POST['RBMrMmeMelle'] . " " . $_POST['CNom'] . " " . $_POST['CPrenom'] . "\n" . $_POST['CAddr1'] . "\n" . $_POST['CAddr2'] . "\n" . $_POST['CCode'] . " " . $_POST['CVille'] . "\n" . $_POST['CEmail'] . "\n" ; $whbh_mail_reply= "xxxxx@reply.com"; $whbh_mail_from="gcharniere@yahoo.fr"; $whbh_mail_sujet= "Demande d'inscription"; $whbh_date = date("D, j M Y H:i:s -0600"); // avec offset horaire $entetemail = "From: $whbh_mail_from \n"; // Adresse expéditeur $entetemail .= "Cc: \n"; // Carbon Copy $entetemail .= "Bcc: \n"; // Copies cachées $entetemail .= "Reply-To: $whbh_mail_from \n"; // Adresse de retour $entetemail .= "X-Mailer: PHP/" . phpversion() . "\n" ; $entetemail .= "Date: $whbh_date"; mail($whbh_mail_to, $whbh_mail_sujet, $whbh_mail_text, $entetemail); } ?> </body> </html>
Partager