Need help with feedback form
Posted: Tue Nov 08, 2005 10:27 am
Hi
I've created a feedback form which sends an e-mail containing the data entered into the form, and would like to know if I can change the way that the contents of the form are inserted into an e-mail.
Here's part of the e-mail generated by the php:
Here's the php script I'm using:
Thanks
I've created a feedback form which sends an e-mail containing the data entered into the form, and would like to know if I can change the way that the contents of the form are inserted into an e-mail.
Here's part of the e-mail generated by the php:
Is it possible to get the address part to have the next line underneath the other so that they are inline?Users name: Kevin B
Business Name: Test
Address: 56 Milton Road
Crewe
Cheshire
Postcode: CW2 6FG
Telephone No: 01270 586790
Here's the php script I'm using:
Code: Select all
<?php if (isset($_POST['submit_form'])) // if the form was sent do the following
{
$name = $_POST['name'];
$busname = $_POST['busname'];
$addr = $_POST['addr'];
$postcode = $_POST['postcode'];
$tel = $_POST['tel'];
$email = $_POST['email'];
$nature = $_POST['nature'];
$msg = $_POST['msg'];
$about = $_POST['about'];
$headers = 'From: '.$name.' <'.$email.'>' . "\r\n" .
'Reply-To: '.$email.'' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
$message = 'Name: '.$name."\n"
.'Business Name: '.$busname. "\n"
.'Address: '.$addr. "\n\n"
.'Postcode: '.$postcode. "\n"
.'Telephone No: '.$tel. "\n"
.'E-mail Address: '.$email. "\n\n"
.'Feedback Comments: '.$msg. "\n";
mail("you@yourmailaddress.com","::: Feedback :::","$message","$headers") or die("email error");
echo '<br />Thank you for your message!'; // if all went well, display message was sent
} // end php submission code ?>