0

Hey guys i seen this script in a tutorial but he never explain how this script function $_SESSION how can i use this script in a project or in any situation. can anyone elaborate this code

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by luweegee
0

You can use session variables in many many situations.
for eg. i have used them for -
1. storing user's details (like name) after login in a session variable, then i can display username on each page of website.

$_SESSION['username']='XYZ';//this is not actual code

2. storing questions & answers for a quiz. Through JavaScript then i make ajax calls for checking user's response.

That said you may end up using them in every website you make.

Vinayak

0

thx for helping me guys i appreciated all ur answer...for now i try to use that variable.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.