# Php contact form

**URL:** <https://forum.kirupa.com/t/php-contact-form/280130>\
**Category:** Uncategorized\
**Created:** [January 23, 2009, 3:27am UTC](https://forum.kirupa.com/t/php-contact-form/280130 "2009-01-23T03:27:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![quartzy](https://avatars.discourse-cdn.com/v4/letter/q/b5a626/32.png) [@quartzy](https://forum.kirupa.com/u/quartzy)\
**Post date:** [January 23, 2009, 3:27am UTC](https://forum.kirupa.com/t/php-contact-form/280130/1 "2009-01-23T03:27:44Z")

</div>

hello  
I follwed and uploaded the script on this site for a contact form. But it just say blarg, when I test it.  
Here is the code of the mailer.php

\<?php  
if(isset($\_POST[‘submit’])) {

$to = “”;  
$subject = “Contact Form”;  
$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!”;

}  
?\>  
have I filled it in correctly? all I have done is removed the email address in the first $to  
I followed the instructions but I think I need to add more to this form. Can anyone help me?
