Estoy probando algunas funciones para principiantes aquí y tengo algunas dificultades para verificar el contenido de $_POST.
¿Que me estoy perdiendo aqui?
<html> <body> <form action="post.php" method="post" > First Number: <input type="text" id="n1" name="n1"> <br> Second Number: <input type="text" id="n2" name="n2" onblur="calcular()"/> <br> <input type="text" id="resultado" name="resultado"> <input type="submit"> </form> <script type="text/javascript"> function calcular() { var n1 = parseInt(document.getElementById('n1').value, 10); var n2 = parseInt(document.getElementById('n2').value, 10); var result = n1 + n2; document.getElementById('resultado').value = result; } </script> </body> </html>Esto es post.php:
<?php echo "<pre>"; var_dump($_POST); echo "</pre>"; ?>