You know how to pull a value from a cookie, so do that first. If the routine you use to get the value of the cookie does not work then it is likely that the cookie is not set...
If you post some code then it should be easy to show you how to do this.