Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Formularz w którym cały czas wyskakuje mi error, Krótkie pytanie krótka odpowiedz
lukaszsss
post
Post #1





Grupa: Zarejestrowani
Postów: 36
Pomógł: 0
Dołączył: 30.11.2008

Ostrzeżenie: (0%)
-----


Cały czas wyskakuje mi wystąpił błąd podczas wysyłania formularza

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
}
?>


Jak temu zaradzic?

Ten post edytował lukaszsss 18.12.2008, 20:24:17
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 3.10.2025 - 09:12