I am having trouble passing a stored cookie over https:
I have a referrer link that looks like this: http://www.mysite.com/index.php?referrer_id=20
on index.php I have this to set the cookies:
if(urldecode($referrer_id)){
setcookie ("referrer_cookie",urldecode($referrer_id),time()+1209600, "/", ".www.mysite.com", 0);
setcookie ("referrer_cook",urldecode($referrer_id),time()+1209600, "/", ".secure.mysite.com", 1);
on https://secure.mysite.com/step_one.php I have this code to retrieve the cookie:
if($referrer_cookie)
$referrer_id = $referrer_cookie;
if($referrer_cook)
$referrer_id = $referrer_cook;
I have this step_one.php file which contains the code to grab the cookie in both my main root directory and in the subdomain directory "secure".
I'm pretty sure ( almost positive ) it was working last night once I put the step_one.php file in the "secure" subdirectory. Now all of the sudden it is losing the cookie when it passes over https://secure.mysite.com.
However if I view step_one.php over http:// instead of https://secure then the cookie value is where it is supposed to be.
Any thoughts as to why or how I can fix this problem?
Thanks for your help in advance.