<span style="color:#028090"><b><?

$sql = "SELECT * FROM `sesiones_carrito` WHERE `user` LIKE '$user' AND `open` = 1 LIMIT 1";

$consulta = mysql_query ($sql);
while ($row = mysql_fetch_array($consulta))
{
$fecha = $row["fecha"];
$ID_carrito = $row["ID"];


$sql2 = "SELECT * FROM `items_carrito` WHERE `ID_carrito` = '$ID_carrito'";

$consulta2 = mysql_query ($sql2);
while ($row2 = mysql_fetch_array($consulta2))
{
$cant = $row2["cant"];
$precio_unidad = $row2["precio_unidad"];
$precio = $row2["precio"];
$ID_item = $row2["ID_item"];


$sql23 = "SELECT * FROM `tienda_articulos` WHERE `ID` = '$ID_item' LIMIT 1";

$consulta23 = mysql_query ($sql23);
while ($row23 = mysql_fetch_array($consulta23))
{
$titulo = $row23["titulo"];

}
mysql_free_result($consulta23);


$total = $total + $precio;

  }
mysql_free_result($consulta2);




  }
mysql_free_result($consulta);
?>
$<?php echo $total; ?></b></span>
