SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Mar 2013
    0 Post(s)
    0 Thread(s)

    Lightbulb help contact form improvement

    Hello !

    I am sure there is more than one smart guy around here that is awesome enough to figure out the solution for my challenge here.

    So I have a contact form and events on my website that I promote via other people also (affiliates).

    People come chose event, put name, email, telefon and promotional CODE (actually affiliate code) aff1, aff2 etc.

    At this point the form sends out an email to me for each registration.

    How can I make the form send out an email to the affiliate also when a user inserts his affiliate code in the CODE input box ?

    So one mail comes to me and automaticly one goes to the affiliate.

    I think at two different solutions - either with database or not.
    A. database

    In my database I have one colum with affiliate codes and next one with their email address. The form searches for a match in database for code entered and if finds a match it send a copy of form submission to the email address associated with the affiliate code it found.

    B. using IF

    IF input_affcode = 001 then sendmail to
    IF input_affcode = 002 then send mail to


    Now I don't know how to do that in coding Please help me out.

    For this moment I am using SIMFATIC forms 3.2 and I would like to have this small function implemented to the code....otherwise it works very well.

    This is part from main thought is to condition the autoresponder to send depending on the promo-code it finds in the input field.

    PHP Code:
    $data_email_sender =  new FM_FormDataSender(sfm_readfile("./templ/contactus_email_subj.txt"),sfm_readfile("./templ/contactus_email_body.txt"),"%email_f%");

    $autoresp =  new FM_AutoResponseSender(sfm_readfile("./templ/LP_inregistrare_resp_subj.txt"),sfm_readfile("./templ/LP_inregistrare_resp_body.txt"));

    All the best to you!
    Andrei Stefan

  2. #2
    SitePoint Evangelist captainccs's Avatar
    Join Date
    Mar 2004
    Caracas, Venezuela
    2 Post(s)
    0 Thread(s)
    If it's the same email, use carbon copy (CC).

    additional_headers (optional)
    String to be inserted at the end of the email header.

    This is typically used to add extra headers (From, Cc, and Bcc). Multiple extra headers should be separated with a CRLF (\r\n).
    Denny Schlesinger
    web services


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts