Warning: Cannot modify header information - headers already sent by (output started at /srv/disk2/1201823/www/-----------.org/Florida/bookingV1.php:1) in /srv/disk2/1201823/www/-----------.org/Florida/bookingV1.php
This is the error I'm getting. How can I fix it?
Here's my code.
<?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));
}
?>
 
     
     
     
    