Hey folks, I have built a larger contact form.. however, when the email is delivered it looks pretty bland and ugly, and also has weird indents.
Here is my code:
// check if fields passed are empty
echo "No arguments Provided!";
$name = $_POST['name'];
$email_address = $_POST['email'];
$companyname = $_POST['companyname'];
$position = $_POST['position'];
$phone = $_POST['phone'];
$description = $_POST['description'];
$registration = $_POST['registration'];
$address = $_POST['address'];
$message = $_POST['message'];
// create email body and send it
$to = 'firstname.lastname@example.org';
$email_subject = "Contact form submitted by: $name";
$email_body = "You have received a quote request. \n\n".
"Here are the details:\n
\nName: $name \n".
Contact Number: $phone\n
Business Description: $description\n
Registration Number: $phone\n
Message: \n $message";
$headers = "From: xx \n";
$headers .= "Reply-To: $email_address";
Can anyone advise how I can get it all lined up first of all please?
I would also like to add some basic styling to make it a little more impressive.
Any help much appreciated.