You got here through affiliate: '; if (!isset($_SESSION['aff_id'])) { echo '(no affiliate)'; } else { echo $_SESSION['aff_id']; } ?>