HTTP is stateless. Consequently:
When a web server is required to customize the content of a web page for a user, the web application may have to track the user’s progress from page to page. A common solution is the use of HTTP cookies. Another method include server side sessions.
PHP supports both sessions and cookies and, as such, allow us to transform the web application into one which supports multiple users concurrently. In other words, the work to do is to transform the web application into one where multiple users can log in and order phones at the same time. We will use PHP sessions to implement those new functionalities.
Additionally, we would like to implement a “Show popular phone of the hour”. We will use PHP cookies (with appropriate expiration dates) to implement this functionality in such a way that queries to the database are minimal.