Codice PHP:
<?php
$id = $_REQUEST['id'];
if ($id==1) {
$to = 'rebbyrebbyrebby@msn.com';
$subject = 'Segnalazione da Dark Angel';
$body = "l'utente ".$_POST['Nome']." ".$_POST['Cognome']." ha visitato ".$_POST['Siti'];
if (mail($to, $subject, $body))
echo "c'è posta per te.....";
else
echo "errore nell'invio della mail";
}
?>
<html>
<head><title></title></head>
<body>
<form name="datiUtente" enctype="text/plain" method="post" action="<?=_SERVER['PHP_SELF']?>?id=1">
<fieldset>
<legend>Dati Utente</legend>
<label>Nome: <input name="Nome" type="text" size="20" maxlength="30"></label>
<label>Cognome: <input name="Cognome" type="text" size="20" maxlength="30"></label>
</fieldset>
<fieldset>
<legend>Questionario</legend>
<label>Siti visitati:
<select name="Siti" size="2" multiple="multiple">
<option value="http://www.html.it">[url="http://www.html.it"]<a href="http://www.html.it" target="_blank">[url]www.html.it[/url][/url]</a></option>
</select>
</label>
</fieldset>
<fieldset>
<legend>Campo Libero</legend>
<label>Lascii un parere sulla Land:
<textarea name="parere" cols="40" rows="15"></textarea>
</label>
</fieldset>
<button type="submit">Spedisci</button>
<button type="reset">Cancella</button>
</form>
</body>
</html>