如何从 php 页面重定向到 html 页面,标题在以下代码中不起作用
<?php include "submit.html";
define('DB_NAME','form');
define('DB_USER','root');
define('DB_PASSWORD','toor');
define('DB_HOST','localhost');
$link = mysql_connect(DB_HOST,DB_USER,DB_PASSWORD);
if(!$link)
{
die('could not connect : ' . mysql_error());
}
$db_selected = mysql_select_db(DB_NAME,$link);
if(!$db_selected)
{
die('Can\'t use ' .DB_NAME . ': ' .mysql_error());
}
$value1 = $_POST['fname'];
$value2 = $_POST['Place'];
$value3 = $_POST['Country'];
$value4 = $_POST['rname'];
$value5 = $_POST['food'];
$value6 = $_POST['ambience'];
$value7 = $_POST['service'];
$value8 = $_POST['clean'];
$value9 = $_POST['pfacility'];
$value10 = $_POST['Entertainment'];
$value11 = $_POST['suggestions'];
$sql = "INSERT INTO demo1 (fname,Place,Country,rname,food,ambience,service,clean,Parking_facilities,Entertainment,suggestions) VALUES ('$value1','$value2','$value3','$value4','$value5','$value6','$value7','$value8','$value9','$value10','$value11')";
if(!mysql_query($sql))
{
die('Error: ' . mysql_error());
}
mysql_close();
header('Location: localhost/submit.html',true);
?>
我如何从这里重定向,为什么上面的代码不起作用?