hello every body on daniweb
i have a problem who i had posted in past but it wasn't solve how can i redirect to another pages after insertind data into data base table, i did it but it work only on wanp in localhost but on web hosting (server) the data insert normal in table and the page just refresh here is the code
$insertSQL = sprintf("INSERT INTO commande (sku, client, `date`, subtotal, total) VALUES (%s, %s, %s, %s, %s)",
GetSQLValueString($_POST['sku'], "text"),
GetSQLValueString($_POST['client'], "text"),
GetSQLValueString($_POST['date'], "date"),
GetSQLValueString($_POST['subtotal2'], "double"),
GetSQLValueString($_POST['total'], "double"));
mysql_select_db($database_marketbase, $marketbase);
$Result1 = mysql_query($insertSQL, $marketbase) or die(mysql_error());
$insertGoTo = 'order-line.php';
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: ".$insertGoTo));
}