PhpTim Posted July 15, 2007 Share Posted July 15, 2007 Hi Everyone, I appreciate the time that you dedicate to my problem. I am working with a form <form name="form" ... etc When I submit the form it produces a form collection. which can be used via $_POST['<name of field>'] but what I am looking for is when I submit the form I get an array or list of the form fields. Does anyone know how to do this? I tried $var1 = $_POST; for($i = 0 ; $i < $var1; $i++) { echo "FieldName $i = ".$var1[$i]."<br />"; } with little results. Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted July 15, 2007 Share Posted July 15, 2007 <?php foreach ($_POST as $key => $val){ echo $key.' - '.$val.'<br>'; } EDIT: You can also view them like this: <?php echo '<pre>'; print_r($_POST); echo '</pre>'; ?> Quote Link to comment Share on other sites More sharing options...
PhpTim Posted July 15, 2007 Author Share Posted July 15, 2007 Thank you very much ... tested it ... works ... TOPIC SOLVED Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.