Hi, I want to store some information for a referrer tracking system I am building and have decided to use sessions (my first time) to store the info between pages...
however, I am having problems getting the results to appear on the next page.
for example:
I start as setup a session like so...
====================================
<?
// Step 1: Setting a name for the session.
session_name("sid");
// Step 2: Starting Session.
session_start();
// Step 3: Setting session variable - rid (rid = referrers ID)
session_register($rid);
?>
====================================
then the user leaves the site buy clicking on the item they wish to purchase, so I pass the sid (Session ID) to the CC authorizing site, that carries this number and returnes it to me after they hand the user back over to my site. I then want to recover the referrer ID from the session, but I get NOTHING.
Is this because I am not telling it the session number correctly, and is fo how should this be done, or am I not asking for the value in $rid (stored in the session) correctly?
Here is the code for the return page:
$sid = $merchant_order_id; << this line is passing the variable that the CC company used to carry the sid number to the $sid
====================================
<?
$sid = $merchant_order_id;
echo "SID=$sid<BR>
MOID=$merchant_order_id<BR>
RID=$rid";
?>
====================================
The echo statement was just so i can see what values were being held by the them.
SID and MOID both have the same number if everything worked correctly, RID, should get the value from the session variable $rid.
But I get nothing, what is wrong?
sorry for the long post, but i am just totally lost and I NEED to get this done soon!