Ver Mensaje Individual
  #12 (permalink)  
Antiguo 12/11/2008, 14:17
Avatar de hoberwilly
hoberwilly
 
Fecha de Ingreso: julio-2008
Ubicación: Lima - Perú
Mensajes: 769
Antigüedad: 16 años, 8 meses
Puntos: 2
Respuesta: Insertar caja de texto a sesion

A ver pateketrueke para entendernos,
con esto, el usuario selecciona los productos con todos los datos (id, nombre, descripcion, precio, etc):
<?php
session_start();
extract($_REQUEST);
include('conec.php');
conectarse();
if(!isset($cantidad)){$cantidad=1;}
$qry=mysql_query("select * from catalogo where id='".$id."'");
$row=mysql_fetch_array($qry);
if(isset($_SESSION['carro']))
$carro=$_SESSION['carro'];
$carro[md5($id)]=array('identificador'=>md5($id),'cantidad'=>$cant idad,'producto'=>$row['producto'],'precio'=>$row['precio'],'id'=>$id);
$_SESSION['carro']=$carro;
header("Location:catalogo.php?".SID);
?>
y lo agrega a un array carro, cierto???????