I have a script which submits information which is being entered in a form to my email.
However, currently when I submit information, I receive it in my email like this:
FirstNameHere
First Name:FirstNameHereLast Name:LastNameHere
But I want it to be in my email like this:
First Name: FirstNameHere
Last Name: LastNameHere
Can anyone help me fix this? This is the code that I currently use.
<?php
$to = "myemailhere@domain.com";
$subject = "Form Information";
$fname = $_POST['fname'] ;
$lname = $_POST['lname'] ;
$message = 'First Name:' . $fname . 'Last Name:' . $lname;
$headers = "From: $email";
$sent = mail($to, $subject, $message, $fname, $lname) ;
?>