Salut,
En fait tu peux avoir ton formulaire sur une page HTML puis sur cette page tu fais un POST vers la page PHP, comme ça:
<form method="post" name="MonForm" action="mail.php">
Avec un bouton:
<input value="Envoyer" type="submit">Dans ta page PHP (mail.php) tu récupères les réponses de ton formulaire comme ceci par exemple n'oublie pas de modifier
monmail@chezmoi.com par ton adresse e-mail:
<?php
$body .= "________________________________________________\n";
if ( isset($_POST) ) {
foreach( $_POST as $key => $val ) {
if (( $key != sendto ) && ( $key != server ) && ( $key != resulturl )) {
$body .= $key . " : " . $val . "\n";
echo $key . " : " . $val . "<br />";
}
}
}
$body .= "________________________________________________\n";
$body .= "submitted by : " . $_SERVER['REMOTE_ADDR'] . "\n";
$body .= "from page : " . $_SERVER['HTTP_REFERER'] ;
mail('monmail@chezmoi.com', $_POST['subject'], $body , 'From: ' . $_POST['email']);
?>