#native_company# #native_desc#
#native_cta#

List posted variables from HTML form.

By Andrew
on 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 -->
<html>

<head>

<title>quickyform</title>

</head>

<body>

<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" />

</form>

</body>

</html>

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

<?php

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

?>

Comments welcome.