Loaing cookie vars in php variables on loading page
I'm setting a cookie with $_SERVER['HTTP_REFERER']; to store in our dbase when an order is placed, however, the cookie var is not loaded immediately in the variables when we set the cookie and load the page.
A manual 'refresh' is needed for it top actually read the cooie and put the var in the orderlink. Is there a snipped to bypass this, or do we need to refresh the page automatically to prevent loss of this variable?
We could use this after setting the cookie
header("Location: http://www.example.com/");
maybe even with $_SERVER[’REQUEST_URI’], but that seems stupid.
Bookmarks