A process_form() Function : Form Data « Form « PHP






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

1.Deal with Array Form Data
2.Access widget's form value
3.Accessing multiple submitted values
4.Calculation based on form data
5.Forms and PHP
6.Feedback Form
7.Handling Special Characters
8.multivalue-forms.php
9.Saying "Hello"