Hello and Thanks for any help in advance.
I am trying to get my mail script to send the output to a html page.
The script works perfectly but the output is very plain. See pictures.
I want this first image information to be displayed on the second image.
Here is the script that I am using.
<?php session_start();
if(isset($_POST['Submit'])) { if( $_SESSION['chapcha_code'] == $_POST['chapcha_code'] && !empty($_SESSION['chapcha_code'] ) ) {
$youremail = 'info@bubbascrubspc.com';
$fromsubject = 'Bubba Scrubs, Inc. Contact Form';
$title = $_POST['title'];
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$mail = $_POST['mail'];
$address = $_POST['address'];
$city = $_POST['city'];
$phone = $_POST['phone'];
$subject = $_POST['subject'];
$message = $_POST['message'];
$todayis = date("l, F j, Y, g:i a") ;
$to = $youremail;
$mailsubject = 'Masage recived from'.$fromsubject.' Contact Page';
$body = $fromsubject.'
The person that contacted you is '.$fname.' '.$lname.'
Address: '.$address.'
'.$city.'
Phone Number: '.$phone.'
E-mail: '.$mail.'
Subject: '.$subject.'
Message:
'.$message.'
|---------END MESSAGE----------|';
echo " Date: "; echo $todayis;
echo " <br/><br/> ";
echo $fname; echo " "; echo $lname; echo ",";
echo "<br/><br/>Thank you for your interest in our services. We will contact you shortly to give you a FREE estimate.<br/>Go to <a href='/index.html'>Home Page</a>";
mail($to, $subject, $body);
unset($_SESSION['chapcha_code']);
} else {
echo 'Sorry, you have provided an invalid security code';
}
} else {
echo "You must write a message. </br> Please go to <a href='/contactus.html'>Contact Page</a>";
}
?>
The code in red is my output and want it to display on my html page.
Any help is appreciated.
Thanks,
Chad