# Another PHP email help thread

**URL:** <https://forum.kirupa.com/t/another-php-email-help-thread/206877>\
**Category:** programming\
**Created:** [November 12, 2006, 6:01pm UTC](https://forum.kirupa.com/t/another-php-email-help-thread/206877 "2006-11-12T18:01:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![manousos](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/manousos/32/2997_2.png) [@manousos](https://forum.kirupa.com/u/manousos)\
**Post date:** [November 12, 2006, 6:01pm UTC](https://forum.kirupa.com/t/another-php-email-help-thread/206877/1 "2006-11-12T18:01:25Z")

</div>

Hi there…new to PHP and new to the forums.

I’m currently running a small home-based server using Apache 2, & PHP 5.0.4  
I have uploaded the simplest form found [here](http://www.kirupa.com/web/php_contact_form.htm) to the root directory, I have even turned register\_globals “on”…but yet get no results. The only change I have made is fill in the “to” field in the mailer.php file with the appropirate address (as seen bellow)

After submitting the info in the contact.html page I am taken to the confirmation page, but nothing is sent to my inbox (I have tried it with a couple of active email addresses)

So…not sure if I’m missing anything, any help or pointing in the right direction would be greatly appreciated…Thanks!!

Contact.html

```auto
<form method="POST" action="mailer.php">
   <input type="text" name="name" size="19"><br>
   <br>
   <input type="text" name="email" size="19"><br>
   <br>
   <textarea rows="9" name="message" cols="30"></textarea>
   <br>
   <br>
   <input type="submit" value="Submit" name="submit">
</form>

```

Mailer.php

```auto
<?php
if(isset($_POST['submit'])) {

$to = "info@flydjs.biz";
$subject = "Form Tutorial";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$message = $_POST['message'];
 
$body = "From: $name_field
 E-Mail: $email_field
 Message:
 $message";
 
echo "Data has been submitted to $to!";
mail($to, $subject, $body);

} else {

echo "blarg!";

}
?>

```
