Make sure you are not redirecting from www.domain.tld to domain.tld or vice versa. These will have different sessions.
The session variable that I set in the current page is getting reset when I redirect (using header function) to another page. Please help me with this issue guys. Thanks