Form Data Not Sent to Email

I made a form for the family web site and when people fill it out and submit, it is supposed to be sent to me as an email. I get the email but there is no data from the form. I must have something in the PHP script not quite right, but I can’t seem to figure out just what I did wrong. I am hoping that someone here can tell where I screwed up and got the code wrong.

Here is the code I am using;

<?php /* Subject and Email Variables */ $emailSubject = 'Registration Form'; $webMaster = '[email protected]'; /* Gathering Data Variables */ $Descendant = $_POST['descendant']; $Spouse = $_POST['spouse']; $Child1 = $_POST['child1']; $Child2 = $_POST['child2']; $Child3 = $_POST['child3']; $Child4 = $_POST['child4']; $body = <<<EOD


Descendant: $descendant
Spouse: $spouse
Child1: $child1
Child2: $child2
Child3: $child3
Child4: $child4
EOD; $headers = "From: $email\r\n"; $headers .= "Content-type: text/html\r\n"; $success = mail ($webMaster, $emailSubject, $body, $headers); ?>

Where is your form code?

The form code I am using is;

That isnt complete…

What’s not complete about it?

Your form has nothing in it? Then, that would be why nothing shows. Otherwise, we need everything from

<form

To

I figured it out, I needed capitalize the first letter in each word in the $body = <<<EOD part of the script. Writing this code can be pretty complicated, but is rather satisfying when you get it working the way you want it to work.

Yeah, variables are case sensitive in PHP.

Sponsor our Newsletter | Privacy Policy | Terms of Service