09-04-2009, 22:29
Witam!
Wstawiłem formularz kontaktowy na stronie o poniższej treści na stronie http://www.me.kpb.com.pl/kontakt.html
Po wysłaniu maila nie ma polskich liter tylko są krzaki zamiast nich.
Co zrobić żeby działało dobrze?
<?php
if (!$_GET[nick] || !$_GET[mail] || !$_GET[temat] || !$_GET[tresc])
{
echo "Nie uzupełniłeś wszystkich rubryk.";
exit;
}
// odbiorca wiadomości
$sendTo = '[email protected]';
$_GET[tresc] =
"<b>Imię:</b><br>
".$_GET[nick]."<br><br>
<b>E-mail:</b><br>
".$_GET[mail]."<br><br>
<b>Treść:</b><br>
".$_GET[tresc]."<br><br>";
$_GET[temat] = "Info z www - ".$_GET[temat];
$_GET[temat] = "=?utf-8?B?".base64_encode($_GET[temat])."?=";
$_GET[nick] = "=?utf-8?B?".base64_encode($_GET[nick])."?=";
$from = $_GET[nick].' <'.$_GET[mail].'>';
$replyTo = $from;
$header .= "Content-type: text/html; charset=utf-8\n";
$header .= "Content-Transfer-Encoding: charset=utf-8\n";
$header .= "From: ".$from."\r\n";
$header .= "Reply-to: $from\r\n";
$header .= "Mime-Version: 1.0\r\n";
$success = mail ($sendTo, $_GET[temat], $_GET[tresc], $header );
if ($success) {
$return = "
Dziękujemy za wysłanie do nas wiadomości,<br />
o treści:<br />
Twoje imię: <strong>".$_GET[nick]."</strong><br />
Temat: <strong>".$_GET[temat]."</strong><br />
Twój adres e-mail: <strong>".$_GET[mail]."</strong><br />
Treść: <strong>".$_GET[tresc]."</strong>
";
echo ($return);
}
?>
Wstawiłem formularz kontaktowy na stronie o poniższej treści na stronie http://www.me.kpb.com.pl/kontakt.html
Po wysłaniu maila nie ma polskich liter tylko są krzaki zamiast nich.
Co zrobić żeby działało dobrze?
<?php
if (!$_GET[nick] || !$_GET[mail] || !$_GET[temat] || !$_GET[tresc])
{
echo "Nie uzupełniłeś wszystkich rubryk.";
exit;
}
// odbiorca wiadomości
$sendTo = '[email protected]';
$_GET[tresc] =
"<b>Imię:</b><br>
".$_GET[nick]."<br><br>
<b>E-mail:</b><br>
".$_GET[mail]."<br><br>
<b>Treść:</b><br>
".$_GET[tresc]."<br><br>";
$_GET[temat] = "Info z www - ".$_GET[temat];
$_GET[temat] = "=?utf-8?B?".base64_encode($_GET[temat])."?=";
$_GET[nick] = "=?utf-8?B?".base64_encode($_GET[nick])."?=";
$from = $_GET[nick].' <'.$_GET[mail].'>';
$replyTo = $from;
$header .= "Content-type: text/html; charset=utf-8\n";
$header .= "Content-Transfer-Encoding: charset=utf-8\n";
$header .= "From: ".$from."\r\n";
$header .= "Reply-to: $from\r\n";
$header .= "Mime-Version: 1.0\r\n";
$success = mail ($sendTo, $_GET[temat], $_GET[tresc], $header );
if ($success) {
$return = "
Dziękujemy za wysłanie do nas wiadomości,<br />
o treści:<br />
Twoje imię: <strong>".$_GET[nick]."</strong><br />
Temat: <strong>".$_GET[temat]."</strong><br />
Twój adres e-mail: <strong>".$_GET[mail]."</strong><br />
Treść: <strong>".$_GET[tresc]."</strong>
";
echo ($return);
}
?>