Back to lesson
1. How do you start a session?
With the session superglobal.
By declaring a session variable.
With the session_start() function.
2. How do you create and assign a session variable?
The same way you create and assign any variable.
$_SESSION["variable_name"] = "Data you want to save";
3. How long does a session variable last?
Till the app closes.
As long as the web browser of the site visitor remains open.
Back to the top
© 2017 GoSkills Ltd.
Skills for career advancement