Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

Email Subscription not showing name and email

$
0
0

Hi,

 

I am having a problem with this simple form and I can't see why the email is not showing the name and email fields.

The email goes through fine and is recieved but just does not show the name and email field.

 

Any thoughts?

 

Thanks

<?php
$field_name = $_POST['cf_name'];
$field_email = $_POST['cf_email'];


$mail_to = '';
$subject = 'Email List Subscription from Toycraft visitor -  '.$field_name;


$body_message = 'From: '.$field_name."\n";
$body_message .= 'E-mail: '.$field_email."\n";


$headers = 'From: '.$field_name."\r\n";
$headers .= 'Reply-To: '.$field_email."\r\n";


$mail_status = mail($mail_to, $subject, $body_message, $headers);


if ($mail_status) { ?>
<script language="javascript" type="text/javascript">
alert('Thank you for your subscription.');
window.location = 'index.php';
</script>
<?php
}
else { ?>
<script language="javascript" type="text/javascript">
alert('Message failed. Please, send an email to studio@');
window.location = 'index.php';
</script>
<?php
}
?>

Attached Thumbnails

  • Screen Shot 2013-06-19 at 12.33.18.png

Viewing all articles
Browse latest Browse all 13200

Trending Articles