# Cannot get this PHP contact form to work

**URL:** <https://forum.kirupa.com/t/cannot-get-this-php-contact-form-to-work/67653>\
**Category:** programming\
**Created:** [October 18, 2004, 4:26pm UTC](https://forum.kirupa.com/t/cannot-get-this-php-contact-form-to-work/67653 "2004-10-18T16:26:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![deronsizemore](https://avatars.discourse-cdn.com/v4/letter/d/8edcca/32.png) [@deronsizemore](https://forum.kirupa.com/u/deronsizemore)\
**Post date:** [October 18, 2004, 4:26pm UTC](https://forum.kirupa.com/t/cannot-get-this-php-contact-form-to-work/67653/1 "2004-10-18T16:26:14Z")

</div>

Here is the site I’m working on: [www.mcihost.com/naturalchoices/requestinfo.php](http://www.mcihost.com/naturalchoices/requestinfo.php)

And here is the PHP code I’ve used in the body of the file “email.php”:

```php
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$dayphone = $_POST['dayphone'];
$nightphone = $_POST['nightphone'];
$regarding = $_POST['regarding'];
$regarding2 = $_POST['regarding2'];
$regarding3 = $_POST['regarding3'];
$regarding4 = $_POST['regarding4'];
$regarding5 = $_POST['regarding5'];
$regarding6 = $_POST['regarding6'];
$regarding7 = $_POST['regarding7'];
$regarding8 = $_POST['regarding8'];
$othertests = $_POST['othertests'];
$healthproducts = $_POST['healthproducts'];
$comments = $_POST['comments']; 
	    
$toaddress = "deronsizemore@yahoo.com";
$subject = "Request Information";
$msg = "$name
";
$msg.= "$email
";
$msg.= "$dayphone
";
$msg.= "$nightphone
";
$msg.= "$regarding
";
$msg.= "regarding2
";
$msg.= "regarding3
";
$msg.= "regarding4
";
$msg.= "regarding5
"; 
$msg.= "regarding6
";
$msg.= "regarding7
";
$msg.= "regarding8
"; 
$msg.= "$othertests
";
$msg.= "$healthproducts
";
$msg.= "$comments
";
$mailheaders = "From: $email
";
$mailheaders .= "To: deronsizemore@yahoo.com
";
$mailheaders .= "Content-Type: multipart/mixed
";
mail("$toaddress", "$subject", "$msg", "$mailheaders"); 
echo("Thank you $name for requesting information about Natural Choices!"); ?>

```

I’ve been using my own e-mail address to test the script and make sure it works. I click submit and then the screen reads “Thank you for requesting info…” like it should. I get an e-mail which has the subject “request info” and the senders e-mail address, but there is not message…just blank. Anyone know what I’m doing wrong. I’m ready to pull my hair out.
