View Full Version : Help With A 'Request A Quote' Form...

12-31-2006, 01:54 PM
Hi Guys,

Just a simple question really...

For a page where you need to send more than one 'option' in a form to an email address... how do you set it up?

So far i've got...

$email = $_POST['email'];
$name = $_POST['name'];
$other = $_POST['otherInformation'];
$message = $_POST['name'] ['companyName'] ['email'] ['telephone'] ['interestedIn'] ['existingSite'] ['hostingAndDomain'] ['otherInformation'];

if (empty($name) || empty($email) || empty($other))
echo '<div align="center" <span class="style2"><strong>ERROR:</strong> You left one or more fields empty, please complete all fields and try again.</span></div>';
include 'quote.htm';

mail( "craig.howarth@toon-army.co.uk", "Quote",
$message, "From: $email" );
header("Location: success.html");

I know the '$message' bit is wrong... how do you set that bit up? I want to add more than one bit of information into the form sent to the email address.

12-31-2006, 02:19 PM
Not sure i understand 100% what you want to do, but i assume you want to join the data to one big string ($message) if so youd do this using the . operator

message = $_POST['name'] . "\n" .
$_POST['companyName'] . "\n" .

for example

12-31-2006, 02:40 PM
That is exactly what I wanted Vegu - it's working too... thanks a lot for your help :thumbsup: