0

Possible Duplicate:
My contact form sends blank body_messages

My contact form is sending emails but they are all empty. All I get is this;

From:
Email:
Company:

I really need this working.

Here is my form:

<form class="contact_form" action="kontakt.php" method="post">
<p><input type="text" required="required" id="name" name="name" class="text_input" size="22"  />
<label for="name">Namn *</label></p>

<p><input type="text" required="required" id="company" name="company" class="text_input" size="22"  />
<label for="company">Företag *</label></p>

<p><input type="email" required="required" id="email" name="email" class="text_input"  size="22"  />
<label for="email">Epost *</label></p>

<p><textarea required="required" name="content" class="textarea" cols="30" rows="5"></textarea></p>

<p><button type="submit" class="button white"><span>Skicka</span></button></p>
<input type="hidden" value="info@web.se" name="contact_to"/>
</form>

and this is my php:

<?php
$name = $_POST['name'];
$company = $_POST['company'];
$email = filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL);
$content = $_POST['content'];
$mail_to = 'info@web.se';
$subject = 'Lilla form'.$name;
$body_message = 'From: '.$name."\n";
$body_message .= 'E-mail: '.$email."\n";
$body_message .= 'Message: '.$content;
$headers = 'From: '.$email."\r\n";
$headers .= 'Reply-To: '.$email."\r\n";
$mail_status = mail($mail_to, $subject, $body_message, $headers);
?>
4

0 に答える 0