Forum Moderators: coopster
I am using the below code, it process the email fine. But the results a just listed one below the other. I would like to add a link break between the contact details and enquirey detail and add a title to each price of date ie
Name =" date here "
Address = " date here "
<br><br>
Enquiry =" data here "
Here is the php
============
<?
$name = $_REQUEST['name'] ;
$email = $_REQUEST['email'] ;
$phone = $_REQUEST['phone'] ;
$fax = $_REQUEST['fax'] ;
$address = $_REQUEST['address'] ;
$enquiry = $_REQUEST['enquiry'] ;
$desktops = $_REQUEST['desktops'] ;
$laptops = $_REQUEST['laptops'] ;
$modems = $_REQUEST['modems'] ;
$printers = $_REQUEST['printers'] ;
$scanners = $_REQUEST['scanners'] ;
$harddisks = $_REQUEST['harddisks'] ;
$memory = $_REQUEST['memory'] ;
$diskwiping = $_REQUEST['diskwiping'] ;
$networking = $_REQUEST['networking'] ;
$collection = $_REQUEST['collection'] ;
$recipient = "info@theurl.com";
$subject = "WebSite Contact Page Feedback";
$message = "
$name
$email
$phone
$fax
$address
$enquiry
$desktops
$laptops
$modem
$printer
$scanner
$harddisks
$memory
$diskwiping
$networking
$collection
";
$extra = "From: $email";
mail( "info@theurl.com", "WebSite Contact Page Feedback",
$message, "From: $email", "-fuser@info@@theurl.com" );
header( "Location: [theurl...] );
?>
======================
the items below the ENQUIRY are checkboxs on the form.
Thanks for any help with this..
as ever
keen to learn..
thanks for that - but im getting this error:
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/fptusername/public_html/dev_folder/formprocess.php on line 23
Parse error: parse error, unexpected T_STRING in /home/ftpusername/public_html/dev_folder/formprocess.php on line 23
any ideas?
Thanks for the help
as ever
keen to learn
yes please see below....
<?
$name = $_REQUEST['name'] ;
$email = $_REQUEST['email'] ;
$phone = $_REQUEST['phone'] ;
$fax = $_REQUEST['fax'] ;
$address = $_REQUEST['address'] ;
$enquiry = $_REQUEST['enquiry'] ;
$desktops = $_REQUEST['desktops'] ;
$laptops = $_REQUEST['laptops'] ;
$modems = $_REQUEST['modems'] ;
$printers = $_REQUEST['printers'] ;
$scanners = $_REQUEST['scanners'] ;
$harddisks = $_REQUEST['harddisks'] ;
$memory = $_REQUEST['memory'] ;
$diskwiping = $_REQUEST['diskwiping'] ;
$networking = $_REQUEST['networking'] ;
$collection = $_REQUEST['collection'] ;
$recipient = "info@theurl.com";
$subject = "WebSite Contact Page Feedback";
$message = "
$name . "\n" .
$email
$phone
$fax
$address
$enquiry
$desktops
$laptops
$modem
$printer
$scanner
$harddisks
$memory
$diskwiping
$networking
$collection
";
$extra = "From: $email";
mail( "info@theurl.com", "WebSite Contact Page Feedback",
$message, "From: $email", "-fuser@info@@theurl.com" );
header( "Location: [theurl...] );
?>
i added the . "\n" . to the first $name to test it.
any idea on adding a title to email also
ie:
name =
address =
thanks for your time on this
as ever
keen to learn..
$message = "Name: $name\nEmail: $email\n Phone: $phone\nFax: $fax\n";
$message .= "Address: $address\n\nEnquiry: $enquiry\nDesktops: $desktops\n";
$message .= "Laptops: $laptops\nModem: $modem\nPrinter: $printer\nScanner: $scanner\n";
$message .= "Harddisks: $harddisks\nMemory: $memory\nDiskwiping $diskwiping\n";
$message .= "Networking: $networking\nCollection: $collection";
This will give you a line break (see the double \n\n) before Enquiry.
You can do it also manually by putting that enter there (enter and \n is the same)
In your 3rd post it wasn't working because you ended string and then put \n (it has to be in the string. I mean you have there: $a = "bla $string."\n"... and it should be $a = "bla ".$string."\nbla";
Notice, that I don't put space after \n. If you put space there your next line will start with space - and that you don't want.
Hope this helps
Michal Cibor