There where some problems i saw in the code, for example on the detail page, you had:
<?php
if (!session_id()) session_start();
$_SESSION["CartAccessCode1"] = "";
$_SESSION["CartAccessCode2"] = "";
?>
then:
<?php
if (!session_id()) session_start();
$_SESSION["CartAccessCode1"] = "";
$_SESSION["CartAccessCode2"] = "";
if(isset($_POST["ClubCartUSA_1_ATC_x"]) && ($row_WADAproducts['PassLength'] > 0)) {
$_SESSION["CartAccessCode1"] = WA_RandomPassword(10, true, true, true, "");
$_SESSION["CartAccessCode2"] = WA_RandomPassword(10, true, true, true, "");
// $_SESSION["CartAccessCode1"] = "".((isset($_POST["AccessCode1"]))?$_POST["AccessCode1"]:"") ."";
// $_SESSION["CartAccessCode2"] = "".((isset($_POST["AccessCode2"]))?$_POST["AccessCode2"]:"") ."";
}
?>
so if you where to visit the detail page, then use the browsers back button to go to the cart page, the sessions would be set to nothing.
On the results page, you had:
<?php
if (!session_id()) session_start();
if(!isset($_SESSION["CartAccessCode1"])) {
$_SESSION["CartAccessCode1"] = "".((isset($_GET["AccessCode1"]))?$_GET["AccessCode1"]:"") ."";
}
?>
<?php
if (!session_id()) session_start();
if(!isset($_SESSION["CartAccessCode2"])) {
$_SESSION["CartAccessCode2"] = "".((isset($_GET["AccessCode2"]))?$_GET["AccessCode2"]:"") ."";
}
?>
But i couldn't see where the access codes where ever being passed through a querystring.