Hi Mike,
You should really be using a MySQL database for this or at least be heavily sanitizing input to remove slashes, etc. [actually, just use if(!is_numeric($ref)) exit('error');] so an attacker can't include files you don't want them to. If all affiliates are subscribed to LMP you could use the LMP database.
I would like Listmail/PHP to take the ID#, inspect the file associated with it, extract the Team members email address and also forward them a copy of the Lead so they can follow up with them.
For signup-xtra.php, example for list 3 with referral ID in custom field 1.
<?phpif($list=='3' && $user1){ if(is_numeric($user1)){ // get affiliate information, set $to_email // depends where the user data is stored... $to_email=''; // send an email $from_name=''; // no quotes in string $from_email=''; $bounce_email=$from_email; // or customize $msg = "Test message"; $subject = "Test subject"; // NOTE: All message codes need to be processed manually using vars passed to or found by signup-xtra.php $msg = eregi_replace('!fname',$fname,$msg); $msg = eregi_replace('!affiliate_email',$to_email,$msg); // send mail mail($to_email,$subject,$msg,"From: \"$from_name\" <$from_email>\nReturn-path: $bounce_email"); } // else skip, not numeric}?>
Regards
Ok you've pushed me in a better direction...
Here's what I've done... In the users file instead of just having data, I now set everything as a variable like:<?php //Set Affiliates Variables$aff_name="Michael Rogers";$aff_phone="937-687-3014";$aff_email="mike@tristateweb.com";$aff_tracking='';// Don't Edit below thisIF (isset($_get['email_lead'])) {$subj="New FCE Lead";$msg="You have a new lead:\n\nName: " . $_GET['fname'] . " " . $_GET['lname'] ."\nEmail: " . $_GET['email'] ."\nPhone: " . $_GET['phone'];$header ="From: FCE <info@fastestcashevermembers.com>\n";$header .= "MIME-Version: 1.0\n";mail($aff_email,$subj,$msg,$header);} else {echo $aff_name . "<br>" . $aff_phone . "<br>" . $aff_email . "<br><br>" . $aff_tracking; }?>
Now when called normally from the site it simply displays the affiliates information to the potential customer.
In signup-xtra.php I now simply call the above file setting email_user=1 which then just emails the affiliate giving them the lead info. I use curl like this: <?phpif($list=='24'){ $ch = curl_init();curl_setopt($ch, CURLOPT_URL,"http://www.fastestcashevermembers.com/users/" . $user1 . ".php?email_lead=1&fname=" . $fname . "&lname=" . $lname . "&email=" . $email . "&phone=" . $user2);ob_start(); // prevent any outputcurl_exec ($ch); // execute the curl commandob_end_clean(); // stop preventing outputcurl_close ($ch);unset($ch);}?>
This seems to work real good for what I need at the moment. If I start to get a lot of users I may move them to a Listmail DB then go from there.
Thanks for your help/guidance.