While the city slept, SJG <st****@sjgill.force9.net> feverishly typed:
I'm having some problems with a php mail form where I am wanting to
send information from 10 form fields in a e-mail. the way I have it
structured for the mail command is
mail ($to,$subject,$message);
where message is made up from the multiple fields from the form e.g
$message = "Name: ".$strName."\r\n";
"Company: ".$strCompany."\r\n";
The e-mail is sent fine but it only gives me the persons name and not
the extra fields.
The semicolons at the end of each line terminate the line of code, so you
have a line of code that says $message = "Name: ".$strName."\r\n"; and
another which is the rather mysterious "Company: ".$strCompany."\r\n";
(though I would expect you to be getting an error message for that line).
As others have suggested, you can use
$message = "Name: ".$strName."\r\n"."Company: ".$strCompany."\r\n";
or,
$message = "Name: ".$strName."\r\n";
$message .= "Company: ".$strCompany."\r\n";
or you could use
$message = "Name: $strName\r\n
Company: $strCompany\r\n";
Hope that helps,
Nige
--
Nigel Moss.
Email address is not valid.
ni***@nigenetDOG.org.uk. Take the dog out!
http://www.nigenet.org.uk | Boycott E$$O!!
http://www.stopesso.com
In the land of the blind, the one-eyed man is very, very busy!