Results 1 to 5 of 5
  1. #1

    referral script? help?

    this is my script for a referreral script:
    <?php
    /*get referrer id*/
    $r_id = $_GET[r_id];
    if($r_id==FALSE) {
    echo "<input type=\"text\" name="\referrer\" value=\"$r_id\">";
    }
    else {
    echo "<input type=\"text\" name="\referrer\" value=\"referrer id here\">
    }
    problem is i dont want users to just refer i want them to refer people who browse and sign-up which is why i want to know some stuff. Right once a form has submitted a form data to a url, is that data still available after they click a link from the from that page? or is that IMPOSSIBLE and would i have to do something like I.P. tracking that saves the referrer id into a database for that I.P. then deletes it if it that I.P. is unactive on the site after 5-10 mins?

  2. #2
    Join Date
    Jul 2001
    Location
    Arizona
    Posts
    144
    Your message is uncomprehensible, at least to me. Can you re-state what you're trying to do, here? If you only want people to be able to refer people who signed up (I THINK that's what you're trying to say), just query the database for that person. If the record exists, then great. If not, then don't accept that as a proper referral.
    Steve - Web Applications Developer
    http://www.sdwebsystems.com

  3. #3
    dude to explain better,
    i want people to browse my site after following a referral link and the $_POST variable to remain on each page

  4. #4
    Join Date
    Jul 2001
    Location
    Arizona
    Posts
    144
    Okay, there are a couple ways to do this. First, you can pass the variable through the query string ($_GET), or you can assign the POST variable to a session, then keep track of the session throughout the pages. If you choose the latter, PHP.net has good explanations of how to use PHP's built-in session management functions.
    Steve - Web Applications Developer
    http://www.sdwebsystems.com

  5. #5
    Using sessions as the poster above me said is the best idea with PHP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •