hello fiend i need help
i have create a lot of pages with same methode and work fine on local but never work online i want know if oder way exist when i have data in form and i clic on submit data insert into table and users directly navigate (go to other)
for exemple add product to cart when user click on add to cart he go directly on cart pages to see whar he has in virtual cart here is part of code item insert the variable insertgoto make problem 'i dont know if you undestund what i mean my english is not good '
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "achat")) {
$insertSQL = sprintf("INSERT INTO panier (client, article, SKU, quantite) VALUES (%s, %s, %s, %s)",
GetSQLValueString($_POST['client'], "text"),
GetSQLValueString($_POST['titre'], "text"),
GetSQLValueString($_POST['sku'], "text"),
GetSQLValueString($_POST['quantite'], "int"));
mysql_select_db($database_marketbase, $marketbase);
$Result1 = mysql_query($insertSQL, $marketbase) or die(mysql_error());
$insertGoTo = "../myspace/panier.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
?>
<form name="achat" method="POST" action="<?php echo $editFormAction; ?>">
<label for="titre"></label>
<input name="titre" type="text" id="titre" value="<?php echo $row_X920['titre']; ?>">
<label for="prix"></label>
<input name="prix" type="text" id="prix" value="<?php echo $row_X920['prix']; ?>">
<label for="quantite"></label>
<input name="quantite" type="text" id="quantite" value="1">
<input name="client" type="hidden" id="client" value="<?php echo $_SESSION['MM_Username']; ?>">
<input name="sku" type="hidden" id="sku" value="<?php echo $row_X920['sku']; ?>">
<input type="submit" name="button" id="button" value="Add to Cart">
<input type="hidden" name="MM_insert" value="achat">
</form>