警告:无法修改标头信息 - 标头已由 /srv/ 中的(输出开始于 /srv/disk2/1201823/www/-----------.org/Florida/bookingV1.php:1)发送disk2/1201823/www/------------.org/Florida/bookingV1.php
这是我得到的错误。我该如何解决?
这是我的代码。
<?php
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form2")) {
$x = $_POST['NoOfPass'] * 500;
$insertSQL = sprintf("INSERT INTO booking2 (Lastname, Firstname, Email, Address, ContactNo, BusType, `From`, `To`, NoOfPass, DateMonth, `Day`, `Time`,Amount) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s,$x)",
GetSQLValueString($_POST['Lastname'], "text"),
GetSQLValueString($_POST['Firstname'], "text"),
GetSQLValueString($_POST['Email'], "text"),
GetSQLValueString($_POST['Address'], "text"),
GetSQLValueString($_POST['ContactNo'], "int"),
GetSQLValueString($_POST['BusType'], "text"),
GetSQLValueString($_POST['From'], "text"),
GetSQLValueString($_POST['To'], "text"),
GetSQLValueString($_POST['NoOfPass'], "int"),
GetSQLValueString($_POST['DateMonth'], "text"),
GetSQLValueString($_POST['Day'], "int"),
GetSQLValueString($_POST['Time'], "text"));
mysql_select_db($database_Connection, $Connection);
$Result1 = mysql_query($insertSQL, $Connection) or die(mysql_error());
$insertGoTo = "confirmation.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
?>