Pisane z palca (powinno działać, nie widzę błędów)
[php]
<?php
////////////////////////////////////////////////////////////////
function wys_mail($od_kogo, $do_kogo, $temat, $tresc)
{
$header = 'MIME-Version: 1.0'."\n";
$header .= 'Content-type: text/html; charset=iso-8859-2'."\n";
$header .= 'From: '.$od_kogo.''."\n";
$text = nl2br ($text);
$text = stripslashes ($text);
if(mail($do_kogo, $temat, $tresc, $header))
{
return true;
}
return false;
}
////////////////////////////////////////////////////////////////
$do_kogo = 'Twó
[email protected]'; //Twój mail
$temat = 'Ankieta'; //Temat Maila
if($_GET['action'] == 'wyslij')
{
$nick = $_POST['nick'];
$mail = $_POST['mail'];
// informacje z formularza
$copywrighter = $_POST['copywrighter'];
$uczucia_1 = $_POST['uczucia_1'];
$uczucia_2 = $_POST['uczucia_2'];
$stres = $_POST['stres'];
$komunikacja = $_POST['komunikacja'];
$asertywnosc = $_POST['asertywnosc'];
$tecza = $_POST['tecza'];
$relaks_1 = $_POST['relaks_1'];
$relaks_2 = $_POST['relaks_2'];
$tresc = 'Ankiete wypełniał: <b>'.$nick.'</b>('.$mail.')<br /><br /><b>Wybrał:</b><br />1.'.$copywrighter.'<br />2.'.$uczucia_1.'<br />3.'.$uczucia_2.'<br />4.'.$stres.'<br />5.'.$komunikacja.'<br />6.'.$asertywnosc.'<br />7.'.$tecza.'<br />8.'.$relaks_1.'<br />9.'.$relaks_2.'<br />';
//
wys_mail($mail, $do_kogo, $temat, $tresc); //wywołanie funkcji
echo 'Mail został wysłany. <a href="javascript: history.go(-1)">Wróć</a>';
}
else
{
echo '<form action="?action=wyslij" method="POST">
<table cellspacing="0" cellpadding="0" width="423">
<tr>
<td width="147"><b>IMIĘ I NAZWISKO</b></td>
<td width="276">
<input type="text" name="nick" maxlength="100" size="40" tabindex="1"><br>
</td>
</tr>
<tr>
<td width="147"><b>E-MAIL</b></td>
<td width="276">
<input type="text" name="mail" maxlength="50" size="40" tabindex="2"><br>
</td>
</tr>
<tr>
<td colspan="2">
<br>SOBOTA<br>
<input type="checkbox" name="copywrighter" tabindex="3" value="Z_pamietnika_copywrightera"> g.12.00 - Z pamiętnika copywrightera...<br>
<input type="checkbox" name="uczucia_1" tabindex="4" value="Poznaje_swoje_uczucia(1_tura)"> g.12.00 - Poznaję swoje uczucia (1 tura)<br>
<input type="checkbox" name="uczucia_2" tabindex="5" value="Poznaje_swoje_uczucia(2_tura)"> g.13.30 - Poznaję swoje uczucia (2 tura)<br>
<input type="checkbox" name="stres" tabindex="6" value="Oswoic_stres">Oswoić stres<br>
<input type="checkbox" name="komunikacja" tabindex="7" value="Komunikacja_w_sporcie"> g.14.00 - Komunikacja w sporcie<br>
<input type="checkbox" name="asertywnosc" tabindex="8" value="Warsztat_asertywności"> g.14.00 - Warsztat asertywności<br>
<input type="checkbox" name="tecza" tabindex="9" value="Warsztat_odpreżająco_-_relaksacyjny_dla_dzieci_Tęcza"> g.15.00 - Warsztat odprężająco - relaksacyjny dla dzieci Tęcza<br>
<input type="checkbox" name="relaks_1" tabindex="10" value="Warsztat relaksacji(1 tura)"> g.16.00 - Warsztat relaksacji (1 tura)<br>
<input type="checkbox" name="relaks_2" tabindex="11" value="Warsztat_relaksacji(2_tura)"> g.16.30 - Warsztat relaksacji (2 tura)</td>
</tr>
</table>
<br>
<input type="submit" value="Zapisz" tabindex="13">
<input type="reset" value="Resetuj formularz" tabindex="12">
</form>';
}
?>
[/php]
Myślę że Cię to zadowoli (również nie posiadam dużo czasu ostatnio)