# Contact Form

**URL:** <https://forum.kirupa.com/t/contact-form/145779>\
**Category:** Uncategorized\
**Created:** [April 25, 2005, 7:49pm UTC](https://forum.kirupa.com/t/contact-form/145779 "2005-04-25T19:49:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![malidia](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/malidia/32/684_2.png) [@malidia](https://forum.kirupa.com/u/malidia)\
**Post date:** [April 25, 2005, 7:49pm UTC](https://forum.kirupa.com/t/contact-form/145779/1 "2005-04-25T19:49:38Z")

</div>

I have done this tutorial:

[http://www.kirupa.com/web/php\_contact\_form.htm](http://www.kirupa.com/web/php_contact_form.htm)

and it’s easy and i can do it, BUT! for some reason i can’t get the php page to take the information from the contact form, send it to my email, and then go to a seperate confirmation page, i thought i had this figured out but apparently i don’t.

so far i have

```php
 
<?php

if(isset($_POST['submit'])) {

$to = "tblank@imagetechnologies.com"; 

$subject = "SUBSCRIBTION NOTIFICATION";

$name_field = $_POST['name'];

$email_field = $_POST['email'];

$company_field = $_POST['company'];

$option = $_POST['radio'];

$body = "From: $name_field
 E-Mail: $email_field
 Company: $company_field
 $option
";

mail($to, $subject, $body);

header ("Location: http://www.imagetechnologies.com");

} else {

echo "ERROR: no data sent!";

}

?>

 

```

and when i put the information in the form it takes me to the url in the code, but the information does not get mailed to me, i am assuming the header command is a bad thing to put in the middle of the PHP code, but how then do i get it to send me the information and then go to a url of my choice?

any help would be fantastic
