Ciao,
ho un form con i vari prodotti scelti dall'utente:
Codice PHP:
<?php
foreach ($_SESSION["shopping_cart"] as $product){
?>
<input name="name" type="hidden" value="<?php echo $product["name"]; ?>" />
<input type="hidden" name="quantity" value="<?php echo $product["quantity"]; ?>" />
<input type="hidden" name="price" value="<?php echo $product["price"]; ?>" /></td>
<?php
}
?>
per inserirli a DB ho usato:
Codice PHP:
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
foreach ($_POST as $product) {
$insertSQL = sprintf("INSERT INTO orders (name, quantity, price) VALUES (%s, %s, %s)",
GetSQLValueString($name = $productl['name'], "text"),
GetSQLValueString($quantity = $productl['quantity'], "text"),
GetSQLValueString($price = $product['price'], "double"));
mysql_select_db($database_Carrello, $Carrello);
$Result1 = mysql_query($insertSQL, $Carrello) or die(mysql_error());
Ma mi inserisce valori senza senso.. dove sbaglio? 
Grazie in anticipo