<?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("[email protected]", "form submission", $msg); } ?>