Parse HTML form results in PHP
The following example shows an efficient way to parse through HTML form results and email you the results. This is very useful when we have large forms with many fields. We must define the variables Name and Email in your HTML form. Then only we can easily use this method to parse variables.
<?php
$Message = “”;
foreach($HTTP_POST_VARS as $key=>$value)
{
if ($value)
$Message .=”$key: $value\r\n”;
}
mail(”mail@domain.com”, “Form Results”, stripslashes($Message), “From: $Name ” );
?>
