Most of the time, we need to track the activities of the visitors throughout the site, automatic or semi-automated identification of their identity (that is, often said the site landing and other functions), we often use cookies and session to track and judge. Session information is stored on the server side, but the session ID is stored in the client cookie, of course, the PHP session storage method is diversified, so that even if the cookie is disabled can be tracked. A cookie is a mechanism for storing data on a remote browser to track and identify users. Cookies are completely kept on the client side such as: IE Firefox will no longer be available when the client prohibits cookies.
Cookie Simple example:
"; echo "Username:". $_cookie[' id '). "
"; echo "Password:". $_cookie[' password '). "
"; echo "Logout cookie"; }?>session Simple example:
"; echo "Username:". $_session[' id '). "
"; echo "Password:". $_session[' password '). "
"; echo "Logout session"; }?>