Bonjour,
Je suis débutant et je n'arrive pas a faire fonctionner mon formulaire newsletter. Pouvez vous me donner un coup de main sur ce problème de premier choix.
Je ne reçois pas l' Email de confirmation
Pouvez-vous adapter <?php……?> avec <form>……</form>
Le lien de ma page: http://www.cijoint.fr/cjlink.php?file=cj200910/cijyw5NMrK.txt
<head>
<?php if($_POST['action'] == "formok")
{
$e_mail = $_POST['email'];
if($e_mail == ""|| $e_mail == "e-mail")
{
$txt = " votre e-mail";
}
else
{
$destinataire= "bwba@hotmail.fr";
$objet = "Demande d'inscription";
$headers = "From: bwba@hotmail.fr \n\r";
$headers.= "Content-Type: text/html; charset=utf-8";
$headers .= "MIME-Version: 1.0 ";
$msg = "Nous vous informons d'une demande d'inscription suivant : ". $e_mail ."";
$msg = nl2br($msg);
mail($destinataire, $objet, $msg, $headers);
$msg2= "
Nous avons bien pris en compte votre demande d'inscription ? la newsletter.
Pour vous d?sinscrire, contactez nous
";
mail($e_mail, $objet, $msg2, $headers);
$txt = "Vous avez un message";
}
}
?>
</head>
<style type="text/css">
body {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:60%;
margin:50px;
color:#666666;}
.fieldset {
width:300px;
border: 0px solid red;
}
.fieldset label {
text-align:right;
width:70px;
float:left;
padding:0.2em;
margin:0;
margin-top:0.3em;
}
.fieldset .nobr {display:none;} .fieldset .textfield {
margin:3px;
height:20px;
width:200px;
border:solid 1px #8caf10;
background: transparent url("http://") no-repeat;
}
.fieldset .textarea {
margin:3px;
height:165px;
width:200px;
border:solid 0 #fff;
}
.submit {
margin:3px;
height:20px;
border:solid 1px #8caf10;
width:80px;
font:1.1em Verdana, Arial, Helvetica, sans-serif;
color:#000000;
text-transform:uppercase;
background: transparent url("http://") no-repeat;
}
}
</style>
<body>
<form action="" method="post">
<fieldset class="fieldset"><br>
<span class="" style="direction: ltr; text-align: left;"><label
for="email"></label></span> <br class="nobr">
<input name="email" class="textfield" id="email"
type="text"> <span class=""
style="direction: ltr; text-align: left;"><br>
<span class="" style="direction: ltr; text-align: left;">
<br class="nobr">
<br>
<label for="submit"> </label><br
class="nobr">
<input name="submit" class="submit" id="submit"
value="envoyer" type="submit"></span></span></fieldset>
</form>
</body>