Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/02/2010, 20:22
Avatar de jival
jival
 
Fecha de Ingreso: noviembre-2007
Mensajes: 173
Antigüedad: 16 años, 5 meses
Puntos: 0
Como envio la cantidad ?

Tengo el siguiente codigo funciona bien:

Código PHP:
<?php 
ob_start
("ob_gzhandler");
//error_reporting(E_ALL);
//@ini_set('display_errors', '1');

session_start();
mysql_connect("localhost","user","1234567");
mysql_select_db("database");
//valor de $carro
if(isset($_SESSION['carro']))
$carro=$_SESSION['carro'];else $carro=false;

$qry=mysql_query("SELECT * FROM catalogo ORDER BY producto ASC"); ?>

<?php 
  $suma
  ?>

<html>
<head>
<title>CAT&Aacute;LOGO</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.catalogo {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 9px;
    color: #333333;
}
.prod {    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 9px;
    color: #333333;
}
-->
</style>
</head>
<body>
<table width="462" align="center" cellpadding="0" cellspacing="0" style="border: 0px solid #000000;">
  <tr valign="middle" bordercolor="#FFFFFF" bgcolor="#DFDFDF" class="catalogo"> 
    <td width="150" align="center"><span class="prod"><?php echo count($carro); ?></span></td>
    <td colspan="3"><span class="prod"><?php echo number_format($suma,2); ?></span></td>
    <td width="66" align="center"><a href="vercarrito.php?<?php echo SID ?>" title="Ver el contenido del carrito"><img src="vercarrito.gif" width="25" height="21" border="0"></a></td>
  </tr>
  <?php
  
while($row=mysql_fetch_assoc($qry)){
  
?>
  <tr valign="middle" class="catalogo">
    <td height="61"><?php echo $row['producto'?></td>
    <td colspan="3"><?php echo $row['detalle'?></td>
    <td>&nbsp;</td>
  </tr>
  <tr valign="middle" class="catalogo"> 
    <td height="22" align="center"><?php echo $row['precio'?></td>
    <td width="84"><form name="form1" method="GET" action="agregacar.php">
      <input name="cantidad" type="text" id="cantidad" value="" size="2"><a href="agregacar.php?<?php echo SID ?>&id=<?php echo $row['id'];?>&cantidad=<?php echo '' ?>">Agregar</a>
    </form></td>
    <td width="19">&nbsp;</td>
    <td width="141"><?php
    
if(!$carro || !isset($carro[md5($row['id'])]['identificador']) || $carro[md5($row['id'])]['identificador']!=md5($row['id'])){
    
    
?>
      <a href="agregacar.php?<?php echo SID ?>&id=<?php echo $row['id'];?>"><img src="productonoagregado.gif" border="0" title="Agregar al Carrito"></a>
      Agregar
      <?php }
    else
        {
?>
      <a href="borracar.php?<?php echo SID ?>&id=<?php echo $row['id'];?>"><img src="productoagregado.gif" border="0" title="Quitar del Carrito"></a>
    <?php ?></td>
    <td>&nbsp;</td>
  </tr><?php ?>
</table>
<p>&nbsp;</p>
<p>&nbsp;
</p>
</body>
</html>
<?php 
ob_end_flush
();
?>
la pregunta es como envio las cantidades :

<input name="cantidad" type="text" id="cantidad" value="" size="2"><a href="agregacar.php?<?php echo SID ?>&id=<?php echo $row['id'];?>&cantidad=<?php echo ''****aqui que debo poner para recoger la info del campo cantidad ***" ?>">Agregar</a>

esa es mi duda,

gracias a los que me ayuden.