PHP SESSION CREATION - PHP LESSON 20 STUDENTSBLOG100

Php Sessions are used to store data inside variable in server. Generally cookies are stored in local system that is in our computer but sessions will be stored in the server.

PHP SESSION SYNTAX:

$_SESSION["session_name"] = "data";
PHP SESSION EXAMPLE:
$_SESSION["username"] = "eshinjozer";
When we create session as like above given example, in the session variable "username", the data "eshinjozer" will be stored on server.

PHP SESSION CREATION PROGRAM:

OUTPUT:
If the session was created, then the output will be "Session created successfully" else "Session was not created"

Lesson 19  Previous | Main Page | Next Lesson 21

Previous
Next Post »