# Contact form problems

**URL:** https://forum.kirupa.com/t/contact-form-problems/296542
**Category:** Uncategorized
**Created:** [September 16, 2009, 10:46am UTC](https://forum.kirupa.com/t/contact-form-problems/296542 "2009-09-16T10:46:03Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Timmytots](https://avatars.discourse-cdn.com/v4/letter/t/bc8723/32.png) [@Timmytots](https://forum.kirupa.com/u/Timmytots)
#### Post date: [September 16, 2009, 10:46am UTC](https://forum.kirupa.com/t/contact-form-problems/296542/1 "2009-09-16T10:46:03Z")

</div>

I’m trying to create a contact form on a client’s site, but get the following message when it’s been submitted:

Parse error: syntax error, unexpected T\_VARIABLE in   
as32ent\domains\s\[hisdomain.com](http://hisdomain.com)\user\htdocs\mailer.php on line 9

I’ve used the kirupa tutorial to create it. This is line 9:

$body = “From: $name\_field  
E-Mail: $email\_field  
Message:  
$message”;

And this is the whole php file:

\<?php  
if(isset($\_POST[‘submit’])) {  
$to = "infoline@hisdomain.com";  
$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 “Thank you. Your message has been submitted to $to!”;  
mail($to, $subject, $body);  
} else {  
echo “please try again”;  
}  
?\>

Your help is much appreciated.
