Kod
<?php
if (count($_POST))
{
////////// USTAWIENIA //////////
$email = [email=""]'lukaszskotarekk@interia.pl'[/email]; // Adres e-mail adresata
$subject = 'temat'; // Temat listu
$message = 'Dziękujemy'; // Komunikat
$error = 'Wystąpił błąd podczas wysyłania formularza'; // Komunikat błędu
$charset = 'iso-8859-2'; // Strona kodowa
//////////////////////////////
$head =
"MIME-Version: 1.0\r\n" .
"Content-Type: text/plain; charset=$charset\r\n" .
"Content-Transfer-Encoding: 8bit";
$body = '';
foreach ($_POST as $name => $value)
if (!empty($value))
$body .= "$name=" . (get_magic_quotes_gpc() ? stripslashes($value) : $value) . "\r\n";
echo mail($email, "=?$charset?B?" . base64_encode($subject) . "?=", $body, $head) ? $message : $error;
}
else
{
?>
<form action="?" method="post">
<input type="submit" name="ok" value="WYSLIJ" size="30" />
<input type="reset" value="WYCZYŚĆ FORMULARZ"></input>
<select>
<option>Lewis Hamilton</option>
<option>Felipe Massa</option>
</select>
</form>
<?php
}
?>
if (count($_POST))
{
////////// USTAWIENIA //////////
$email = [email=""]'lukaszskotarekk@interia.pl'[/email]; // Adres e-mail adresata
$subject = 'temat'; // Temat listu
$message = 'Dziękujemy'; // Komunikat
$error = 'Wystąpił błąd podczas wysyłania formularza'; // Komunikat błędu
$charset = 'iso-8859-2'; // Strona kodowa
//////////////////////////////
$head =
"MIME-Version: 1.0\r\n" .
"Content-Type: text/plain; charset=$charset\r\n" .
"Content-Transfer-Encoding: 8bit";
$body = '';
foreach ($_POST as $name => $value)
if (!empty($value))
$body .= "$name=" . (get_magic_quotes_gpc() ? stripslashes($value) : $value) . "\r\n";
echo mail($email, "=?$charset?B?" . base64_encode($subject) . "?=", $body, $head) ? $message : $error;
}
else
{
?>
<form action="?" method="post">
<input type="submit" name="ok" value="WYSLIJ" size="30" />
<input type="reset" value="WYCZYŚĆ FORMULARZ"></input>
<select>
<option>Lewis Hamilton</option>
<option>Felipe Massa</option>
</select>
</form>
<?php
}
?>
Jak temu zaradzic?