I need to keep track of location and distance like oodle.com does. I don't want it bundled into the url, so I am using cookies.
I use that info on many parts of the page, like the header, sidebar, widgets... etc.
Where can I put the code so that I can access it without a call to cookies... or can I just ask for $_COOKIE['value'] anywhere in my code?
Also, does the server ask the users computer for the cookie every time I access a cookie or is the entire cookie contents retrieved and globally accessible to code?
Here is my issue... the user selects a new location, that is sent to the host which changes the cookie info, then all of the code must be able to see this info and use it instead of the cookie, since the cookie info is now incorrect now that the user sent us the new location.
I need to be able to access some global value for that location in all the associated files, functions etc.