Je voudrais avant tout remercier salemioche et son site, sur lequel j'ai trouvé de quoi faire un formulaire de contact. Mais j'ai du sauté quelque chose car çà ne fonctionne pas.
http://www.salemioche.net/script-php-1.php
J'ai ajouté:
------
<div align=center>
<form method=POST action=formmail.php >
<input type=hidden name=subject value=formmail>
<table>
<tr><td>Votre Nom:</td>
<td><input type=text name=realname size=30></td></tr>
<tr><td>Votre Email:</td>
<td><input type=text name=email size=30></td></tr>
<tr><td>Sujet:</td>
<td><input type=text name=title size=30></td></tr>
<tr><td colspan=2>Commentaires:<br>
<textarea COLS=50 ROWS=6 name=comments></textarea>
</td></tr>
</table>
<br> <input type=submit value=Envoyer> -
<input type=reset value=Annuler>
</form>
</div>
------
à ma page contact.php (Je veux regarder la page contact)
et voici ma page formmail.php
------
<!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=iso-8859-1" />
<title>Document sans titre</title>
</head>
<body>
<?php
$TO = "mon email";
$h = "From: " . $TO;
$message = "";
while (list($key, $val) = each($HTTP_POST_VARS)) {
$message .= "$key : $val\n";
}
mail($TO, $subject, $message, $h);
Header("Location: http://www.roulereconomique.com/contact.php");
?>
</body>
</html>
------
J'ai remplacer mon email,
J'ai surement du sauter quelque chose.
Quelqun sait ce que c'est?
http://www.salemioche.net/script-php-1.php
J'ai ajouté:
------
<div align=center>
<form method=POST action=formmail.php >
<input type=hidden name=subject value=formmail>
<table>
<tr><td>Votre Nom:</td>
<td><input type=text name=realname size=30></td></tr>
<tr><td>Votre Email:</td>
<td><input type=text name=email size=30></td></tr>
<tr><td>Sujet:</td>
<td><input type=text name=title size=30></td></tr>
<tr><td colspan=2>Commentaires:<br>
<textarea COLS=50 ROWS=6 name=comments></textarea>
</td></tr>
</table>
<br> <input type=submit value=Envoyer> -
<input type=reset value=Annuler>
</form>
</div>
------
à ma page contact.php (Je veux regarder la page contact)
et voici ma page formmail.php
------
<!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=iso-8859-1" />
<title>Document sans titre</title>
</head>
<body>
<?php
$TO = "mon email";
$h = "From: " . $TO;
$message = "";
while (list($key, $val) = each($HTTP_POST_VARS)) {
$message .= "$key : $val\n";
}
mail($TO, $subject, $message, $h);
Header("Location: http://www.roulereconomique.com/contact.php");
?>
</body>
</html>
------
J'ai remplacer mon email,
J'ai surement du sauter quelque chose.
Quelqun sait ce que c'est?
Dernière édition: