I want to integrate my CB registration form with an affiliate sign up form. Ideally, I will create a tab under which my affiliates will sign up and this sign up info will be sent to my affiliate db. I have the code to insert, can you tell me where to insert the php script to send registration info?
// inserting new affiliate
// the mandatory fields might differ depending
// on your settings
$affiliate = new Pap_Api_Affiliate($session);
$affiliate->setUsername("some@email.com");
$affiliate->setFirstname("John");
$affiliate->setLastname("Smith");
try {
if ($affiliate->add()) {
echo "Affiliate saved successfuly";
} else {
die("Cannot save affiliate: ".$affiliate->getMessage());
}
} catch (Exception $e) {
die("Error while communicating with PAP: ".$e->getMessage());
}