![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
28/05/2010, 18:02
|
![Avatar de frankjoel86](http://static.forosdelweb.com/customavatars/avatar270596_1.gif) | | | Fecha de Ingreso: noviembre-2008 Ubicación: Ica
Mensajes: 295
Antigüedad: 16 años, 3 meses Puntos: 0 | |
Carrito de compra saludos gentita estoy en mis pininos de php y deseo saber como hacer un carrito de compra algo basico. dejo lo q e podido avanzado.
<form id="form1" name="form1" method="post" action="carrito02.php">
Producto
<label>
<input type="text" name="item" />
</label>
<p>Unidades
<input type="text" name="cantidad" id="cantidad" />
</p>
<p>
<label>
<input type="submit" name="Agregar" id="Agregar" value="Agregar a Canasta" />
</label>
</p>
</form> carrito02.php
<?php
session_start();
$cantidad=$_POST[cantidad];
$item=$_POST[item];
$canasta=$_SESSION['canasta'];
if(isset($_SESSION['canasta'])){
foreach($_SESSION['canasta'] as $k => $v)
echo "Items ". $k. "Cantidad". $v. "<br>";
?>
*Se agradece cualquier ayuda. |