Let I solve your problem.
Earlier I do also faced this problem. Before I give you the solution , let me give you important details about the session. It's about session id and it's storage.
When a php session is started at first, there created a 32 digit hexadecimal value as an identifier we say session id. (Session id will be destroyed when the user closes the browser or after certain time that the Programmer set. ) After creating a 32 digit hexadecimal id , the server sends a cookie with PHPSESSID to the user's system. PHPSESSID stores the session id. (Now session id is available at both sides i.e client side and server side). When you browse in the particular website, the stored PHPSESSID is sent along with the request(mean you are accessing another page). So that you can access session variables in another page too.
Now coming to point,
When we are using XAMPP, both the server and the client are in the same system.
session1.php
0 Comments