witam
mam mały problem.
otóż potrzebuję po wyświetleniu komunikatu z podziękowaniem za wypełnienie formularza przekierować automatycznie użytkowników do konkretnej strony. gdzie wstawić ten parametr?? header ("Location: http://www.xxx.pl/");
pozdrawiam
<?php
if (count($_POST))
{
////////// USTAWIENIA //////////
$email = [email=""]'xxx@xxx.pl'[/email]; // Adres e-mail adresata
$subject = 'Dane kontaktowe dotyczące pobrania specyfikacji przetargowej'; // Temat listu
$message = 'Dziękujemy za wysłanie formularza'; // 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 (is_array($value))
{
for ($i = 0; $i < count($value); $i++)
{
$body .= "$name=" . (get_magic_quotes_gpc() ? stripslashes($value[$i]) : $value[$i]) . "\r\n";
}
}
else $body .= "$name=" . (get_magic_quotes_gpc() ? stripslashes($value) : $value) . "\r\n";
}
echo mail($email, "=?$charset?B?" . base64_encode($subject) . "?=", $body, $head) ? $message : $error;
}
else
{
}
?>