# Php form handling

**URL:** <https://forum.kirupa.com/t/php-form-handling/303938>\
**Category:** Uncategorized\
**Created:** [January 29, 2010, 10:00am UTC](https://forum.kirupa.com/t/php-form-handling/303938 "2010-01-29T10:00:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zedzephyr](https://avatars.discourse-cdn.com/v4/letter/z/edb3f5/32.png) [@zedzephyr](https://forum.kirupa.com/u/zedzephyr)\
**Post date:** [January 29, 2010, 10:00am UTC](https://forum.kirupa.com/t/php-form-handling/303938/1 "2010-01-29T10:00:22Z")

</div>

Hi, I’m trying to create an a couple of online forms. The first one sends the users’ email address to an email address so they can sign up to a newsletter. At the moment I receive the test emails, but they are blank. Here’s the HTML

\<form method=“post” action=“contact.php”\>  
Email: \<input name=“email” type=“text”\>\<br\>  
\<input type=“submit” value=“Sign up”\>  
\</form\>

Here’s the php:

\<?php  
$to = "info@hotlookhair.com";  
$subject = “general”;  
$email = $\_REQUEST[‘email’] ;  
$headers = “From: [customer@hotlookhair.com](mailto:customer@hotlookhair.com)”;  
$sent = mail($to, $subject, $message, $headers) ;  
if($sent)  
{print “Your mail was sent successfully”; }  
else  
{print “We encountered an error sending your mail”; }  
?\>

Any help would be appreciated
