Se, visto che, alla fin fine devo fare l' acquisto per PIU PRODOTTI la tua soluzione non va bene xD TI SCRIVO IL LINK DI DOVE HO VISTO COME FARE IL CARRELLO LI CE SPIEGATO BENE sia funzioni.php che carrello.php http://www.mrwebmaster.it/php/artico...mysql_769.html
mentre ti scrivo log.php è una semplice pag x il login dell utente. GRAZIE TI DEVO UN FAVORE ENORME ...TROVERò IL MODO DI RICAMBIARE 
Codice PHP:
<?php require_once('Connections/negoziomusica.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
?>
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['idutente'])) {
$loginUsername=$_POST['idutente'];
$password=$_POST['password'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "acquista.php";
$MM_redirectLoginFailed = "log.php";
$MM_redirecttoReferrer = true;
mysql_select_db($database_negoziomusica, $negoziomusica);
$LoginRS__query=sprintf("SELECT idutente, password FROM cliente WHERE idutente=%s AND password=%s",
GetSQLValueString($loginUsername, "int"), GetSQLValueString($password, "text"));
$LoginRS = mysql_query($LoginRS__query, $negoziomusica) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && true) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
<style type="text/css">
.USER {
font-family: "Lucida Console", Monaco, monospace;
}
.USER {
font-family: "Comic Sans MS", cursive;
font-weight: bold;
font-style: italic;
font-size: large;
color: #00C;
}
.USER .USER .USER {
font-size: large;
}
.USER .USER .USER {
color: #00C;
font-weight: bold;
font-style: italic;
}
.NOVEDI {
color: #CCC;
}
body {
background-color: #CCC;
}
.no {
color: #F00;
}
.no {
font-weight: bold;
}
</style>
<form action="<?php echo $loginFormAction; ?>" method="POST">
<span class="USER"><span class="USER"><span class="USER">EFFETTUA IL LOGIN </span></span></span></p>
<span class="USER"><span class="USER"><span class="USER">Username</span></span></span>
<input type="text" name="idutente">
</p>
<span class="USER">Password</span>
<input type="password" name="password">
</p>
<span class="NOVEDI">IIIIIIIIIIIIIIIIIII</span>
<input name="button" type="submit" class="USER" id="button" value="Invia" />
</p>
<span class="no">NON SEI REGISTRATO?..</span>[url="ok.php"].registrati [/url]</p>
</form>