|
Posted by Geoff Berrow on 01/31/07 09:22
Message-ID: <bARvh.187755$Kh7.174122@fe2.news.blueyonder.co.uk> from
David Smithz contained the following:
>However, to improve presentation in some cases, I want to be able to rename
>the field name that is displayed in the email. So in the example above we
>might want to replace firstname with "First Name".
What I do is create a lookup array.
$lookup=array("firstname"=>"First name", "lastname"="Last
name","addr1"=>"Address line 1", ... );
Your values will be returned in the $_POST array so basically it is
something like this
$mailbody= "Values submitted from form\n\n";
foreach($_POST as $key=>$value){
$mailbody.= $lookup[$key]." - ".$value."\n";
}
I sometimes have an exclude array too because you may not want to
display submit buttons or hidden fields.
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
Navigation:
[Reply to this message]
|