Bonjour,
Je suis un débutant et j'aimerai créer un formulaire pour la newsletter de mon site, après de multiples recherche je suis arrivé a deux code:
1ere code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>formr</title>
</head>
<body
style="color: rgb(0, 0, 0); background-color: rgb(122, 122, 122);"
alink="black" link="black" vlink="black">
<form name="sub" method="post" action="news_letter.php">
<input name="addr" maxlength="250" size="35"
value="entrez votre mail ici" class="text_area"
type="text"> <input name="action"
value="inscription" checked="checked" type="radio">Inscription
<input name="action" value="desinscription"
type="radio">Désinscription
<input name="send" value="Valider"
onclick="Submitform()" type="button"><br>
</form>
</body>
</html>
2eme code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>form</title>
</head>
<body
style="color: rgb(0, 0, 0); background-color: rgb(122, 122, 122);"
alink="black" link="black" vlink="black">
<div style="text-align: center;"><input value="formmail"
name="subject" type="hidden"> </div>
<div align="center">
<form action="formmail.php" method="post">
<table>
<tbody>
<tr>
<td>Votre Nom:</td>
<td><input size="30" name="realname"></td>
</tr>
<tr>
<td>Votre Email:</td>
<td><input size="30" name="email"></td>
</tr>
</tbody>
</table>
<br>
<input checked="checked" value="inscription"
name="action" type="radio"> Inscription
<input
value="desinscription" name="action" type="radio">
Désinscription <br>
<br>
<br>
<input value="Envoyer" type="reset"> - <input
value="Annuler" type="reset"> </form>
<?php $TO = "postmaster@argentnetdunet.com";
$h = "From: " . $TO;
$message = "";
while (list($key, $val) = each($HTTP_POST_VARS)) {
$message .= "$key : $val\n";
}
mail($TO, $subject, $message, $h);
Header("Location: http://argentnetdunet.com/merci.html");
?>
</div>
</body>
</html>
POUR ce deuxieme code j fait le teste pour recevoir un email de teste qui se passe
Ma question comment faire pour le reste c'est à dire la récuperation des données et l'affichage d'une page qui dit: merci pour votre inscription
J'utilise le logiciel de creation de site
Web studio plus
Aidez mois svp et cordialement