formulario.html
<form method="post" action="recebe.php"> <input type="text" name="campo1" /> <input type="text" name="campo2" /> <input type="text" name="campo3" /> <input type="text" name="campo4" /> <input type="text" name="campo5" /> <input type="text" name="campo6" /> <input type="text" name="campo7" /> <input type="text" name="campo8" /> <input type="text" name="campo9" /> <input type="text" name="campo10" /> <input type="text" name="campo11" /> <input type="text" name="campo12" /> <input type="text" name="campo13" /> <input type="text" name="campo14" /> <input type="text" name="campo15" /> <input type="submit" /> </form>
recebe.php
<?php foreach($_REQUEST as $key=>$value){ var_dump($key); var_dump($value); } ?>
resultado:
string(6) "campo1" string(0) "" string(6) "campo2" string(0) "" string(6) "campo3" string(0) "" string(6) "campo4" string(0) "" string(6) "campo5" string(0) "" string(6) "campo6" string(0) "" string(6) "campo7" string(0) "" string(6) "campo8" string(0) "" string(6) "campo9" string(0) "" string(6) "campo10" string(0) "" string(6) "campo11" string(0) "" string(6) "campo12" string(0) "" string(6) "campo13" string(0) "" string(6) "campo14" string(0) "" string(6) "campo15" string(0) ""
Fonte: http://stackoverflow.com/a/993888/1671446
Nenhum comentário:
Postar um comentário