Thursday 4 December 2014

What is Session in PHP?


A Session is a logical object created by PHP engin to allow you to preserve data across the application, Sessions are commonly used to store temporally data to allow multiple PHP pages to offer a complete functional transaction for the same visitor.
Ex: 
/* To start session*/
session_start();

/* add variable in session */
$_SESSION['user'] = 'mohan';
/* to end session*/
session_distroy();