How To Start A Session In PHP?

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • lisajohn
    replied
    A PHP session is used to store data on a server rather than the computer of the user. Session identifiers or SID is a unique number which is used to identify every user in a session based environment. The SID is used to link the user with his information on the server like posts, emails etc.

    Leave a comment:


  • SwatiSood
    replied
    To begin a new session, simply call the PHP session_start() function. It will create a new session and generate a unique session ID for the user. The PHP code in the example below simply starts a new session.

    Leave a comment:


  • Swati walia
    replied
    When you work with an application, you open it, do some changes, and then you close it. This is much like a Session. The computer knows who you are. It knows when you start the application and when you end. But on the internet there is one problem: the web server does not know who you are or what you do, because the HTTP address doesn't maintain state.

    Leave a comment:


  • priya.sharma
    started a topic How To Start A Session In PHP?

    How To Start A Session In PHP?

    A PHP session is easily started by making a call to the session_start() function.This function first checks if a session is already started and if none is started then it starts one. It is recommended to put the call to session_start() at the beginning of the page.
Working...
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎