Ver Mensaje Individual
  #21 (permalink)  
Antiguo 25/01/2012, 15:50
webankenovi
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Como armar variable para tomar otro dato

ok haber trabajando segun lo tenias tal cual te lo doy lo añades y despues me muestras como lo dejaste ya con los estilos y todo

añade esto a la pagina de articulos como hiciste

Código PHP:
Ver original
  1. <?php
  2.     if(isset($_SESSION['carro'][$productos['id']])){ ?>
  3.     <form method="post" action="carro.php?id=<?php $productos['id']; ?>&action=removeProd">
  4.     <?php }else{?>
  5.     <form method="post" action="carro.php?id=<?php $productos['id']; ?>&action=add">
  6.     <?php }?>
  7.      
  8.      
  9.     <select name="color">
  10.     <option value="">seleccionar</option>
  11.      
  12.     <?php
  13.     while($fila=mysql_fetch_row($result)){
  14.     echo "<option value='".$fila['1']."'>".$fila['1']."</option>";
  15.     }
  16.     ?>
  17.      
  18.     </select>
  19.      
  20.     <?php
  21.     if(isset($_SESSION['carro'][$productos['id']])){ ?>
  22.     <input name="" type="image" src="img/remove_carro.png" width="50" height="50">
  23.     <?php }else{?>
  24.     <input name="" type="image" src="img/add_carro.png" width="50" height="50">
  25.     <?php }?>
  26.      
  27.     </form>

y en carro en estas lineas

echo "<tr>";
echo "<td align='left'> $_POST[id] </td>";
echo "<td align='left'> $_POST[color] </td>";
echo "<td align='center'>$x</td>";

lo cambias por

Código PHP:
Ver original
  1. echo "<tr>";
  2.                     echo '<td align="left">'.$mifila['producto'].'</td>';
  3.                     echo "<td align='left'> $_POST[color]  </td>";
  4.                     echo "<td align='center'>$x</td>";