Ver Mensaje Individual
  #10 (permalink)  
Antiguo 09/03/2004, 19:07
nesky
 
Fecha de Ingreso: noviembre-2003
Mensajes: 59
Antigüedad: 20 años, 4 meses
Puntos: 0
Uta me equivoque ESTE ES EL CODIGO QUE RECIBE solo 2 datos y obviamente me muestra solo los 2

session_start();
if ($item){
if (!isset($itemsEnCesta)){
$itemsEnCesta[$item]=$cantidad;
}else{
foreach($itemsEnCesta as $k => $v){
if ($item==$k){
$itemsEnCesta[$k]=$cantidad;
$encontrado=1;
}
}
if (!$encontrado) $itemsEnCesta[$item]=$cantidad;
}
}
$_SESSION['itemsEnCesta']=$itemsEnCesta;
?>
<?
if (isset($itemsEnCesta)){
echo'El contenido de la cesta de la compra es:<br>';
foreach($itemsEnCesta as $k => $v)
{
echo 'Codigo: '.$code.' Artículo: '.$k.' ud: '.$v.' Cantidad : '.$cant.' Total = '.$v*$cant.' <br>';
}
}
?>

Nesky