Mostly i have used $_SESSION, But while reading about Session i got few terms
$_ENV &
$_COOKIE.
I am not getting clear about when to use which one, i am confuse about the situation where i can use them. So How these term are different?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
All three are superglobal, that means any script in your application can access it, BUT
while $_SESSION and $_COOKIE are different (and private) for each user, the $_ENV superglobal is not specific to a user. The difference between $_SESSION and $_COOKIE is that $_COOKIE can live beyond the current user visit, while the session will end when the user leave your site (or close his browser).
You can find here more good information about session http://www.php.net/manual/en/intro.session.php