Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Dec 2005
    Posts
    702
    Thanks
    0
    Thanked 0 Times in 0 Posts

    affiliate id shows to booking form only after I move a little in the website ?

    affiliate id shows to booking form only after I move a little in the website ?
    session/cookie affiliate program
    =================================
    home-page
    http://www.pafoscarhire.com/
    Code:
    <?php
    session_start( );
    $affiliate = '10000';  //default value 
    if (isset($_COOKIE['aff']) && ($_COOKIE['aff'] != Null)) 
    {
      $affiliate = $_COOKIE['aff']; 
    } 
    else if (isset($_GET['aff']) && ($_GET['aff'] != Null)) { 
      $affiliate = $_GET['aff']; 
      setcookie("aff", $affiliate, time()+60*60*24*90);    //  3 months 
    }
    $_SESSION['affiliate'] = $affiliate ;
    ?>
    -------------------------------------------------
    Final Booking Form
    https://pafoscarhire.com/php/booknow00001.php
    Code:
    <?php
    session_start();
    $affiliate_id = $_SESSION['affiliate'];
    $email_text = "You book through affiliate ID: {$affiliate_id}";
    ?>
    ---------------------------------------------------------------------

    http://www.pafoscarhire.com
    https://pafoscarhire.com/php/b0000012010a7.php [https://pafoscarhire.com/php/normaldays00001a7.php] normal quote
    https://pafoscarhire.com/php/normald...compact1a7.php compact quote
    https://pafoscarhire.com/php/booknow00001.php auto booking form

    Please note that the problem is:
    When I go to to GET QUOTE the first time [open pc , go to , get quote 1st time] when I go to auto-booking-form [ https://pafoscarhire.com/php/booknow00001.php] from form at home-page . I see

    You book through affiliate ID: NEITHER DEFAULT AFF-ID I GET ...

    ------------------------------------------
    but after not submit form press back[browser] , to go again to home-page[hp] and resubmit booking order I see
    You book through affiliate ID: xxxxx xxxxx = aff id
    As I see to get aff id I must return to hp[move into site for a little] ...well ?
    can you test it in your PC ?
    YOU GET ME ....?

    http://www.pafoscarhire.com >submit form>
    https://pafoscarhire.com/php/b0000012010a7.php >
    https://pafoscarhire.com/php/booknow00001.php I do not see aff id first time when after I move little into site and return back here I can see the aff id.
    What to do if "...the problem might be the way the server is configured..." ?
    May this have to do with the SECURE CERTIFICATE HTTPS:// ?

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    You posted very little code for us to try to find any kind of a problem... my advice is you add displays to each script to debug where the logic is breaking down. As you are using sessions and cookies the most helpful things to display will be the $_COOKIE array, the $_SESSION array and the $_POST and $_GET arrays. Use print_r() to display these arrays, like so:
    PHP Code:
    print "<pre>session values:\n";
    print_r($_SESSION);
    print 
    "</pre>\n"

  • #3
    Regular Coder
    Join Date
    Dec 2005
    Posts
    702
    Thanks
    0
    Thanked 0 Times in 0 Posts
    where to include the code you refer ?
    after get these arrays post them here in forum ?


  •  

    Posting Permissions

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