utahfriend Posted August 2, 2010 Posted August 2, 2010 I am setting up affilates to sell our products. When someone comes from the affiliate's website, there is a code that is passed by "GET" value. I want to save that value to a session value so that when they make an order, the value is added to the database. However, I cannot get the variable to save to a session variable. The code I put in the index.php files is as follows: if ($_GET['affiliate']) { $value=$_GET['affiliate']; $_SESSION['affiliate']=$value; } Any and all help is appreciated!
germ Posted August 2, 2010 Posted August 2, 2010 Try this: if ($_GET['affiliate']) { $value=$_GET['affiliate']; if ( ! tep_session_is_registered('affiliate') ) tep_session_register('affiliate'); } If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Recommended Posts
Archived
This topic is now archived and is closed to further replies.