Ver Mensaje Individual
  #21 (permalink)  
Antiguo 14/07/2011, 15:50
Avatar de jotaincubus
jotaincubus
 
Fecha de Ingreso: mayo-2005
Ubicación: Medellin - Colombia
Mensajes: 1.797
Antigüedad: 19 años
Puntos: 394
Respuesta: sumar un $post a mysql

Que es esto ?

Código HTML:
Ver original
  1. <form action="ventas2.php" method="post">
  2. Producto:<br><input type="text" name="producto" /><br>
  3. </form>
  4. <form action="ventas2.php" method="post">
  5. Proveedor:<br><input type="text" name="proveedor" /><br>
  6. </form>
  7. <form action="ventas2.php" method="post">
  8. Cantidad:<br><input type="text" name="cantidad" /><br>
  9. <br><input type="submit" value="+" name="add" />
  10. </form>

No tenes que crear un <FORM> por cada campo de tu formulario mira es asi:

Código HTML:
Ver original
  1. <form action="ventas2.php" method="post">
  2. Producto:<br><input type="text" name="producto" /><br>
  3. Proveedor:<br><input type="text" name="proveedor" /><br>
  4. Cantidad:<br><input type="text" name="cantidad" /><br>
  5. <br><input type="submit" value="+" name="add" />
  6. </form>

Ahora todos los datos se enviaran con el mismo post y los podes recoger como lo estas haciendo...
__________________
Por que existe gente que no agradece después de que se le ha brindado tiempo y ayuda ???