Jump to content

sendmail


jonyork

Recommended Posts

hey guysalright, my sendmail works, but i only get the values. i would like it so the values would be labled. this is my code<?php$to = "info@yorkdigitalsolutions.com";$subject = "Test mail";$message = $_POST['lastname'] . "\n\r";$message .= $_POST['firstname'] . "\n\r";$message .= $_POST['phone'] . "\n\r";$message .= $_POST['make'] . "\n\r";$message .= $_POST['model'] . "\n\r";$message .= $_POST['year'] . "\n\r";$message .= $_POST['engine'] . "\n\r";$message .= $_POST['drive'] . "\n\r";$message .= $_POST['cab'] . "\n\r";$message .= $_POST['box'] . "\n\r";$message .= $_POST['problem'] . "\n\r";$from = "Request a part";$headers = "From: $from";mail($to,$subject,$message,$headers);echo "<h3><br/> Information Submitted</h3>";?>in the email i receivelastname_valuefirstname_valueand so on. however, i would like it to appear aslastname : lastname_valueFirstname : firstname_valuethanks in advance any help is appcreciated.

Link to comment
Share on other sites

Just add the "label" before the value.Like this:

$message = 'Lastname: ' . $_POST['lastname'] . "\n\r";$message .= 'Firtstname: ' .  $_POST['firstname'] . "\n\r";...

Good Luck and Don't Panic!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...