pagina.html:
codice:
<form name="datiUtente" enctype="text/plain" method="post" action="mail.php">
<fieldset>
<legend>Dati Utente</legend>
<label>Cognome: <input name= "Cognome " type=" text" size="20" maxlength="20"></label>
<label>Indirizzo con civico: <input name= "Indirizzo " type=" text" size="50" maxlength="40"></label>
<fieldset>
<legend>Campo libero</legend>
<label>Richieste particolari:
<textarea name="Richieste" cols="150" rows="3"> </textarea>
</label>
</fieldset>
<button type="submit">invia</button>
<button type="reset">annulla</button>
</form>
mail.php
Codice PHP:
<?php
$messaggio="Cognome:" . $_POST['Cognome'] . "/Indirizzo:" . $_POST['Indirizzo'] . "/Richieste:" . $_POST['Richieste'];
mail ('tuaemail', 'Ordine On-Line', $messaggio, "From: [email]onlineorderer@tuosito.it[/email]");
?>