I can't find a good answer for this anywhere. I have a login page, and after a good login it redirects to main page. In FF, and chrome - works perfect. On IE it doesn't work. I keep losing the session when I get to the main page.
I have checked the following: - session_start at top - no blanks or anything befoer header redirect - one line before the redirect, IE knows the session user id, but after the redirect, just one line after the session start, it loses the session user id - I've checked it also on other computer - same results
What is wrong with IE? or what could be wrong with my script ? Thanks
error_reporting
to -1
; reproduce error; check logs $_SESSION
relies on either a cookie or URL-based session identifier. It seems as though it's having trouble saving the cookie [Edit]
session_start()
twice ;) Ok,
Problem solved. I can't find the logic behind this solution, but although I had session_start() at the top of the page, I added another session_start() just before writing the session vars.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.