Jump to content

add_hook problem


Recommended Posts

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated