add a 2nd email address to the php mail() function.
Can not do that. There are about 50 Distributor email addresses and I need the copy to reach only to the relevent distributor & myself)
send the relevant email address to your php file so it can add the a cc in your email header.
But how would the PHP recoganize to which DISTRIBUTOR should the email be sent?
My website is linked to 50 distributor websites (that's 50 DISTRIBUTOR email addresses). Customers come to my website through my distributors website. I need a way to send a Cc to the relevant distributor where the CUSTOMER come into my website.
A, B, C & D are distributors. A customer logs in to D's website and come in to my website (using the link). When the customer place the order there I need the email to be sent to my email address & a Cc to D's email address.
how do you know which site they come from?
Through the URL! (IF IT WORKS)
What do you suggest is best for my problem? Isn't there any automated system to do this. WHAT I ULTIMATELY NEED IS TO IDENTIFY THE RELEVENT DISTRIBUTOR, SO THAT I CAN PAY HIM A COMMESSION FROM THE TOTAL ORDER.
there's no automated system.
It sounds too advanced. Could you please give an simple explaination on how to do that. Step by step.
show a query string sample that might be used by one of your vendors.
1 person found this helpful
It's really not that difficult. The hard part would be getting each Distributor to add code to their site to pass a variable with the link when they link to your site. I assume this is a Flash application, but it's the same if it were in PHP and Flash wasn't involved.
Basically, the link on their site would include a variable in the querystring:
Each Distirbutor ID is unique. Your PHP page would extract that ID and a) pass it into Flash then match it to an email address or b) match it to an ID on the PHP page, then pass the email address into Flash.
Another method is to use the HTTP referer - you would have to determine the page that links to your site, and match that page to your email address. But sometimes these server variables get blocked, so I don't think that's reliable.
Figure out which way you think may end up using, then we can work on the step by step.
Oh, and there's alwasy an option just to have the user select the Distributor from a list menu, make it a required field.
I'd go with the first suggestion (getting each Distributor to add code to their site to pass a variable with the link).
IN the HTML
<PARAM NAME=FlashVars VALUE="userName=permadi&score=80">
How can I code the PHP? I googled without any success. Please help.