<?php require_once "class/class.php"; $obj = new Trabajo(); $id = strip_tags($_GET["id"]); $productos = $obj->getProductosPorId($id); ?> <html> <head> <title>..::Mi carrito::..</title> <link rel="stylesheet" type="text/css" href="css/estilos.css"> <link rel="stylesheet" type="text/css" href="css/detalle.css"> <script type="text/javascript" src="js/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="js/funciones.js"></script> </head> <body> <div class="cabez"> <div id="header"> <?php require_once "header.php"; ?> <div id="logo"> <a class="brand" href="index.php">Carro de compras</a> </div> </div> </div> <div id="principal"> <!--********************menu****************************************--> <!--********************contenedor******************************** --> <div id="content">
?> <table border="0"> <tr> <th>Producto</th> <th>Cantidad</th> <th>Peticion Normal</th> <th>Ajax</th> <th> </th> <th>Total</th> </tr> <?php foreach ($_SESSION["carro"] as $key => $valor) { $fi = $obj->getProductosPorId($key); foreach ($fi as $fila) { $id = $fila["id"]; $producto = $fila["producto"]; $precio = $fila["precio"]; } $coste = $precio * $valor; $totalcoste = $totalcoste + $coste; $Total = $Total + $valor; ?> <tr> <td><?php echo $producto; ?> </td>