header
 
     
 
pixel
pixel pixel

Parsing HTML form results

Here's a powerful way to parse through HTML form results and email you the results, particularly for large forms with lots of fields. This is mainly useful if you're not too fussed on how formatted the form results are (note, you must define the variables Name and Email in your HTML form for this to work):
<?php
$Message 
"";
foreach(
$HTTP_POST_VARS as $key=>$value)
    {
    if (
$value)
        
$Message .="$key: $value\r\n";
    }
// replace 'youremail@yourdomain.com' with your own email.
mail("youremail@yourdomain.com""Form Results"stripslashes($Message), "From: $Name <$Email>" );
?>

Unhelpful Helpful Rating 4.0 (score out of 5, no. of ratings: 16)
Comments
Comment by Devon on 2005-02-28
love it

Comment by joeBanana Confused on 2005-07-16
pff I don't Understand

Post a Comment
Name
Email
(optional)
Comment
RatingUnhelpful Helpful
Security Image* (this is just to prevent spam submissions)
Security Image