6 Replies Latest reply on Apr 19, 2010 12:05 PM by dan hop

    PHP Problem-Combining firstName.' '.lastName in Formmailer

    dan hop Level 1

      I don't know where else to get advice.

      I'm using DBmasters FormMailer.

      I sent a request for help to Dan B. at FormMailer web site but no  response yet. Been a while.


      The form works fine.

      Gathers the info, sends the emai BUT the resulting email doesn't have the name preceeding the email address.


      I'm required to collect the first name and the last name in separate input fields.


      I can make the resulting email contain either the first name or the last name - but the outgoing email has to be from firstName-space-lastName then the email address. 'Joe Blow -joeblow@someisp.com' -


      I've been working on this for more than a week. Can't get it to work right.


      Here's my latest attempt-doesn't work. All I get is the email address. (no name)


      // 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 */



      You can see that I've created a new variable '$cName' to hold the combined first-space-last names, then used that variable in the $reply_to_name.


      Thank you for any guidance you can offer.


      Dan H.