veracityit Posted June 28, 2011 Share Posted June 28, 2011 I have used an add_hook function i found on this forum to automatically activate a clients affiliate account when they first sign up. The code looks like this: <?php //affiliate.php found in /includes/hooks/ add_hook("ClientAdd",0,"affiliate_ClientAdd",""); function affiliate_ClientAdd($vars) { $result = full_query ("INSERT INTO tblaffiliates (clientid, date) VALUES ('".$vars['userid']."', now())"); logactivity("Activated Affiliate Account (User ID: ".$vars['userid'].")"); } ?> This code works fine. The problem is whenever i have this file in the folder auto redirection does not work, at all. This includes login, logout and the registration process. It's like it gets to the end of my script and just stops. I tried adding a header("Location: affiliates.php"); but that didn't work either. Does anyone have any ideas what could be the problem? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.