php-form-processor.php

<!DOCTYPE html>
<html lang="en">

<head>
  <title>Form Data</title>
  <meta charset="utf-8">
</head>
<body>

<h1>Raw Form Data</h1>
<pre>
<?php
  // print the associative array for debugging
  // To avoid HTML injection, escape all HTML special chars
   print htmlspecialchars(print_r($_POST,true));
?>
</pre>

<!-- Extract each form item from posted data -->
<h1>Form input values</h1>
<p>Your Name: <?php print htmlspecialchars($_POST["visitor_name"]) ?></p>
<p>Password: <?php print htmlspecialchars($_POST["password"]) ?></p>
<p>License accepted: <?php print htmlspecialchars($_POST["licenseOK"]) ?></p>
<p>Account type: <?php print htmlspecialchars($_POST["account_type"]) ?></p>
<p>Options: <?php print htmlspecialchars($_POST["options"]) ?></p>
<p>Operating system: <?php print htmlspecialchars($_POST["system"]) ?></p>
<p>Remarks: <?php print htmlspecialchars($_POST["remarks"]) ?></p>

<!-- Run thru all elements of the array of posted data -->
<h1>All Form Data</h1>
<?php
    foreach($_POST as $key=>$val)
    {
        print "<p>".htmlspecialchars($key)." = ".htmlspecialchars($val)."\n</p>";
    }
?>

</body>
</html>