我遇到了旧的标题问题,只是无法让它重定向我该如何解决?
警告:无法修改标头信息 - 标头已发送
<?php if (isset($_POST['email']))
{
$content = '<html><body>';
$content .= 'Email Address: '.$_POST['email'].'<br />';
$content .= 'Enquiry Type: '.$_POST['enquiry'].'<br />';
$content .= 'Message: '.$_POST['message'].'<br />';
$content .= 'Telephone Number: '.$_POST['telephone'].'<br />';
$content .= 'Preferred Contact Method:" '.$_POST['contact-method'] ;
$content .= '</body></html>';
$to = 'myemail*email.com';
$subject = 'Website Contact Form ';
$headers = "From: " . strip_tags($_POST['email']) . "\r\n";
$headers .= "Reply-To: ". strip_tags($_POST['email']) . "\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
if (mail($to, $subject, $content, $headers)) {
header('Location:form-submitted.php');
}
}
?>
<!DOCTYPE html>
<html>