After the summary of session and cookie knowledge, I will explain the main differences between the two to the majority of php learners.
After the summary of session and cookie knowledge, I will explain the main differences between the two to the majority of php learners.
Session stores the customer's status on the server side. as long as the browser is not closed, the user's information can be saved all the time. Generally, the user login information is saved.
The cookie stores the information on the client, which is written to the file.
Session implementation uses the cookie technology (we will introduce it in detail later). first, save a cookie containing the sessionid on the client and store other sessions on the server. When a user requests a service, the sessionid is sent to the server together. You can use sessionid to extract the variables stored on the server to identify users. Of course, if the client disables the cookie, the session will become invalid.