Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/11/2011, 18:01
Avatar de jor_0203
jor_0203
 
Fecha de Ingreso: octubre-2011
Ubicación: mexico
Mensajes: 760
Antigüedad: 12 años, 6 meses
Puntos: 8
como puedo hacer una suma infinita con php

como puedo hacer una suma infinita con php, es decir, cuando alguien me pague la guardo en sesiones y cuando otra persona también me pague se sume a la sesion
gracias

Código PHP:
Ver original
  1. <?php session_start(); ?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>Documento sin t&iacute;tulo</title>
  7. </head>
  8. <body>
  9. <form id="form1" name="form1" method="post" action="">
  10.  nombre      
  11. <input type="text" name="nombre"/>
  12. <br />
  13. pago    
  14. <input type="text" name="producto" />
  15. <br />
  16. <input type="submit" value="Enviar Pago" />
  17. </form>
  18. <?php
  19. echo "tu  nombre es: ";
  20. $a=$_SESSION['nom']=$_POST['nombre'];
  21. echo $a."<br>";
  22. echo "tu pago es :";
  23. $b=$_SESSION['pro']=$_POST['producto'];
  24. echo $b."<br> ";
  25. echo "la suma total de todos los productos es";
  26. ?>
  27. </body>
  28. </html>