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

07-17-2007, 05:33 PM
affiliate id shows to booking form only after I move a little in the website ?
session/cookie affiliate program

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

$affiliate_id = $_SESSION['affiliate'];
$email_text = "You book through affiliate ID: {$affiliate_id}";

https://pafoscarhire.com/php/b0000012010a7.php [https://pafoscarhire.com/php/normaldays00001a7.php] normal quote
https://pafoscarhire.com/php/normaldays00001compact1a7.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:// ?

07-17-2007, 07:57 PM
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:

print "<pre>session values:\n";
print "</pre>\n";

07-18-2007, 06:25 AM
where to include the code you refer ?
after get these arrays post them here in forum ?