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

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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.