但是在页面提交后,输出就是这种方式。
警告:无法修改标头信息-已在/storage/ssd3/284/9123284/public_html/post.php中发送的标头(输出始于/storage/ssd3/284/9123284/public_html/post.php:20)在第25行
这是我的php代码
<?php
include 'connection.php';
$fullname = ($_POST['fullname']);
$email = ($_POST['email']);
$subject = ($_POST['subject']);
$message = ($_POST['message']);
$sql = "INSERT INTO clients (fullname, email, subject, message) VALUES ('$fullname', '$email', '$subject', '$message')";
if (mysqli_query($conn,$sql)){
echo "Your message was received I will be getting back to you shortly";
}
else {
echo "Error: " . $sql . "<br>";
}
header("refresh:0.5; url=index.html");
?>
我希望页面会重定向回首页。