Hi, I was wondering if anyone knows of a javascript code to get the userid from a previously set cookie (using php) either directly or after being made a variable ($userid). The reason being, I have successfully coded in php for a cookie to be created on the browser of a user returning to my website, this cookie is used for the tracking code in the various ways in which each the affiliate companies specify. It all works fine using php to put the cookie userid in the space after say &epi= for
TD or &SID for CJ if I use the merchant banner links in static pages, however I store all the banner links in a database and the user selects a small selection of banners dynamically, relevant to the interest of the user to save space on the page, and this is where it fails. I can see it in the url.
So I think if I use JScript in my code it might not fail as my php one does, since a few banner links are coded in JS like TradeDoubler.
I think it would be on the lines of document.write(' <a hef="http etc/click-123456-123456?SID='+userid+'"><img src etc etc and then some code in the header that makes the function but I not too sure about javascript code.
Reading through other threads I think most afflities extract the userid as a variable from a database of users once they log in each time they use the website, but I can't see how this would be any different if I end up with a userid variable anyway. Thanks.