PHPBuilder - List posted variables from HTML form.

RSS Twitter

List posted variables from HTML form.

by: Andrew
April 21, 2006

Version: 0.1

Type: Full Script

Category: HTML

License: GNU General Public License

Description: This example is 2 files. One .htm file that contains a HYML form. The other is a PHP file which loops through all of the posted variables and displays them. Comments appreciated

<!-- Here is the HTML page -->





<form name="form1" action="listpostedvars.php" method="post">

<input type="text" name="meh" value="0" />

<input type="text" name="meh1" value="1" />

<input type="text" name="meh2" value="2" />

<input type="text" name="meh3" value="3" />

<input type="text" name="meh4" value="4" />

<input type="submit" name="submit" value="list those vars" />




<!-- Heres the php, name it listpostedvars.php -->


foreach($_POST as $key => $value)
		echo "$key = $value<br />";


Comments welcome.

Comment and Contribute

Your comment has been submitted and is pending approval.




(Maximum characters: 1200). You have characters left.