every time user login to my website I put his userID and userIP in session, and check, in every page, if session userID exist, and if userIP equal to his IP.

So If user change the ID value in the session than the IP won't be equal to his IP

if ($_SESSION['userIP'] != getenv("REMOTE_ADDR") )

My question is why. I don't remmeber why changing the userID value (inside the session) will make the userIP not being equal to his real IP ?

Thanks

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top