ecco un esempio di modulo per contratti che se studiato bene lo puoi trasformare in ciò che vuoi facendo anche modluli con condizioni IF
Codice: Seleziona tutto
<?php
if ($_POST["email"]<>'') {
$ToEmail = 'tuaEmail@tuoDominio.it';
$EmailSubject = 'Contatti form ';
$mailheader = "From: ".$_POST["email"]."\r\n";
$mailheader .= "Reply-To: ".$_POST["email"]."\r\n";
$mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n";
$MESSAGE_BODY = "Nome: ".$_POST["nome"]."<br>";
$MESSAGE_BODY .= "Email: ".$_POST["email"]."<br>";
$MESSAGE_BODY .= "Commenti: ".nl2br($_POST["commenti"])."<br>";
mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Fallito");
?>
Vostro messaggio è stato inviato.
<?php
} else {
?>
<form action="form_contatti.php" method="post">
<table width="400" border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="29%" class="bodytext">Vostro nome:</td>
<td width="71%"><input name="nome" type="text" id="nome" size="32"></td>
</tr>
<tr>
<td class="bodytext">Indirizzo email:</td>
<td><input name="email" type="text" id="email" size="32"></td>
</tr>
<tr>
<td class="bodytext">Commenti:</td>
<td><textarea name="commenti" cols="45" rows="6" id="commenti" class="bodytext"></textarea></td>
</tr>
<tr>
<td class="bodytext"> </td>
<td align="left" valign="top"><input type="submit" name="Submit" value="Send"></td>
</tr>
</table>
</form>
<?php
};
?>



