Difference between a Session and a Cookie?
A session is a global variable stored on the server side. Each session is assigned a unique id which is used to retrieve a stored values. Ex-First start session <?php session_start(); $_SESSION["name"]=$_POST["username"]; ?> • Sessions have the volume to store comparatively large data compared to cookies. The session values are automatically deleted when the browser is closed then session is expired. • Session data is stored on the server side, whereas cookies store data in the visitor's browser side. • Sessions are more secure than cookies as it is stored in server. Cookie can be turn off from browser. Ex- Cookie start with Syntax: setcookie(name, value, expire, path, domain); <?php $xyz=time()-60*60*24*30; // Sec*Mint*Hours*Day setcookie("Mohit"," Bca 1st Year",$xyz); echo $_COOKIE['Mohit']; print_r($_COOKIE); ?> Session: Session variables stored information about one single user, and...