Combining $Fname.' '.Lname input variables??

06 Apr 2010
Posted by Dan Hopper

My project requires that I get both the first name and the last name of the person who submits the form (DBmasters formmailer).

The resulting email needs to show the name AND the email address of the sender:
joe Blow-joeblow@someisp.com- the minus signs are used in place of the greater/less than signs so my example will display...

I've been researching this for more than a week but can't get it to work.

Here's what I've tried.
Can you help please?

Dan H.

////////////////////////////////////////////////////////
// Testing a combination of $P_FNAME." ".P_LNAME in the $reply_to_field //
// replacing the reply_to_fielld with the variable $cNAME=P_FNAME.' '.PLname //
$reply_to_field[3]="P_EMAIL"; /* the email address of the guy filling out the form */
$cName="$P_FNAME[3]".' '."$P_LNAME[3]"; /* set $cname equal to the 2 strings separated by a space */
$reply_to_name[3]="$cName"; /* The $reply_to_name[3] should show up in the resulting email in the 'from' line */
////////////////////////////////////////////////////////

Tags: