Ver Mensaje Individual
  #9 (permalink)  
Antiguo 03/04/2012, 19:47
Th3C0d3R
 
Fecha de Ingreso: abril-2012
Ubicación: Guadalajara
Mensajes: 16
Antigüedad: 12 años
Puntos: 0
Respuesta: Problema con campo de incremento y decremento

Cita:
Iniciado por edward18_1 Ver Mensaje
a ver!...como que si! es eso... pero como tu mandas esos valores? por GET o POST ?
no estoy muy seguro pero este es el codigo del sitio del inventario
Código PHP:
<?php
// se incluye el archivo que provee la conexion a la base de datos 
// y se declara la variable $rst_inventario la cual muestra los datos obtenidos de la tabla inv
include("conexion.php");
$rst_inventario=mysql_query("SELECT * FROM inv",$conexion);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>SIV - Home</title>
       <link href="./css/main.css" rel="stylesheet" ></link>
    <link href="./css/tablas.css" rel="stylesheet" ></link>
    </head>

<body>
    <div id='wrapper'>
        <div id='header'>
        <h1>SIV</h1>
        </div>
        
        <div id='nav'>
            <a href='./'>Inicio</a>
            <a href='./inv.php'>Inventario</a>
            <a href='#'>Panel</a>
        </div>
        
        <div id='content'>
            <div id='left-inv'>
            <!-- Se establece la tabla en la que se mostraran los datos solo los encabezados -->
              <table class="table3" width="921">
                <tr bgcolor="#CCCCCC">
                <form method="post" action="acciones/add_confirm.php">
                  <td width="781">Nombre del producto<input name="producto" type="text" size="70" /></td>
                  <td width="128"><input type="submit" value="Añadir"  /></td> 
                </form>
                </tr>
              </table>
            <?php
            $num_registros
=mysql_num_rows($rst_inventario);
            if (
$num_registros==0)
            {
            echo 
"No se han encontrado productos";
            
mysql_close($conexion);
            exit();
            }
            else
            {}
            
?>
              <table class="table3" width="100%" border="0">
                <tr align="center" valign="middle" bgcolor="#999999">
                  <th scope="col" >ID </th>    
                  <th width="50%" scope="col" >Producto</th>
                  <th width="19%" scope="col">Cantidad</th>
                  <th width="21%" scope="col">Fecha</th>
                  <th width="5%" scope="col">Borrar</th>
                </tr>
                <?php
                
while ($fila=mysql_fetch_array($rst_inventario))
                {
                
?>
                <tr bgcolor="#CCCCCC">
                  <td ><?php echo $fila['id']; ?></td>    
                  <td height="37"><img src="images/Carton.png" width="16" height="16" /><?php echo $fila['producto'];?></td>
                  <td><?php echo $fila['cantidad']; ?><a href="aumentar.php?more=<?php echo $fila['id'];?>">  <img src="images/Add.png"                         alt="Aumentar" width="16" height="16" border="0" />   </a><a href="decrementar.php?less=<?php echo $fila['id'];?>"><img src="images/Minus.png" width="16" height="16" border="0" /></a></td>
                  <td><img src="images/Calender.png" width="16" height="16" /><?php echo $fila['fecha'];?></td>
                  <td><a href="acciones/delete.php?prod=<?php echo $fila['producto'];?>">  <img src="images/Trash.png" width="16" height="16" border="0" align="absmiddle" /></a></td>
                </tr>
                <?php
                
}
                
?>
              </table>
            </div>            
          <div class='clear'></div>
        </div>
        
        <div id='footer'>
            Copyright 2012 <a href='./'>WorkShop.com</a>
        </div>
    </div>
</body>
</html>
Tu me diras que esta mal porque la verdad no estoy muy seguro de que sea el problema