kjl-php Posted March 25, 2008 Share Posted March 25, 2008 I have a redirect file, no code in it except a variable that builds a URL and appends a value from a cookie to it...bur for some reason it isn't grabbing the value from the cookie. I use the exact code on another site and it works... Here's the code for the redirect page: <?php $redirecturl = 'http://www.domain.com/?id='.$_COOKIE['my_cookie']; header('location: '.$redirecturl); ?> I verified that there is in fact a value in the cookie by using the following code in a test page...(I tried both $_COOKIE & $HTTP_COOKIE_VARS because I don't really know the difference between the two but they both work in the test page anyways.) <?php echo $HTTP_COOKIE_VARS["subid_value"]; ?> Any reason why that I'm missing? Thanks in advance, Keith Link to comment https://forums.phpfreaks.com/topic/97882-bizarre-cookie-problem/ Share on other sites More sharing options...
kjl-php Posted March 26, 2008 Author Share Posted March 26, 2008 If I type the URL in the browser of the redirect page, the resulting URL has the cookie value appended. When I click a hyperlink to the redirect page, it doesn't show the cookie value and when I copy and past the URL in the browser it doesn't shows the cookie value. I cleared the cache, etc. Any ideas? Link to comment https://forums.phpfreaks.com/topic/97882-bizarre-cookie-problem/#findComment-500862 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.