Hi, I have a form which uses php script. I obtain this script from a friend and tried to make some changes. However, the result when someone enters and submit the form, the recepient email would receive the following result: Company: aaa\nName: \nAddress: aa\nEmail: \nTel: a\nFax: \nMobile: \nEnquiry: bb\n Is there a way to remove the \n from the script? I'm unfamilliar with .php script and unsure on how to modify it. Thanks if can help
Exactly: echo "Company: aaa\nName: \nAddress: aa\nEmail: \nTel: a\nFax: \nMobile: \nEnquiry: bb\n"; PHP: And not: echo 'Company: aaa\nName: \nAddress: aa\nEmail: \nTel: a\nFax: \nMobile: \nEnquiry: bb\n'; PHP: Because, echo with single quotes gives the real word etc.
Thanks guys! But I'm still not sure where to put the double quotes...below is how the script look like in the php file: $message = 'Company: '.$_POST['txtCompany'].'\n'. 'Name: '.$_POST['txtName'].'\n'. 'Address: '.$_POST['txtAddress'].'\n'. 'Email: '.$_POST['txtEmail'].'\n'. 'Tel: '.$_POST['txtTel'].'\n'. 'Fax: '.$_POST['txtFax'].'\n'. 'Mobile: '.$_POST['txtMobile'].'\n'. 'Enquiry: '.$_POST['txtEnquiry'].'\n'; where should the double quotes be placed?
$message = 'Company: '.$_POST['txtCompany'].'\n'. PHP: Should be: $message = "Company: '.$_POST['txtCompany'].'\n". PHP: and can also be: $message = "Company: ".$_POST['txtCompany']."\n". PHP: