Answer the question
In order to leave comments, you need to log in
How to make a redirect in php form handler?
<?php
$sendto = "[email protected]"; // Куда отправлять
$yarcc = $_POST['year'];
$namecc = $_POST['name'];
$mail = $_POST['email'];
// Тема сообщения
$subject = "test!!";
$headers = "From: " . strip_tags($usermail) . "\r\n";
$headers .= "Reply-To: ". strip_tags($usermail) . "\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=UTF-8 \r\n";
// Структура сообщения
$msg = "<html><body style='font-family:Arial,sans-serif;'>";
$msg .= "<h2 style='font-weight:bold;border-bottom:1px dotted #ccc;'>Новый заказ!</h2>\r\n";
$msg .= "<p><strong>ИМЯ:</strong> ".$namecc."</p>\r\n";
$msg .= "<p><strong>type:</strong> ".$type."</p>\r\n";
$msg .= "<p><strong>maill :</strong> ".$mail."</p>\r\n";
$msg .= "</body></html>";
// Результат отправки
if(@mail($sendto, $subject, $msg, $headers)) {
echo "<center><img src='images/spasibo.png'></center>";
} else {
echo "<center><img src='images/ne-tpravleno.png'></center>";
}
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question