Home » Interview » Technology

What Is a Session in PHP?

Correct Answer: A PHP Session persist the user information to be used later For example, user name, password, shopping item details The session is temporary and will be removed soon after the user has left the web site The session can be persisted for long term usage on databases like MySQL Each session is identified by a unique Id number for every visitor The first step to use PHP session is to start the session The starting session must precede the operations like HTML or the other The statement session_start() starts the PHP session and registers the user’s information on the server

← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion