A process_form() Function
<?php
function process_form($data) {
$msg = "The form at {$_SERVER['PHP_SELF']}
was submitted with these values: \n\n";
foreach($data as $key=>$val) {
$msg .= "$key => $val\n";
}
mail("joeuser@somewhere.com", "form submission", $msg);
}
?>
Related examples in the same category