Back to lesson
1. How do you start a session?
By declaring a session variable.
With the session_start() function.
With the session superglobal.
2. How do you create and assign a session variable?
$_SESSION["variable_name"] = "Data you want to save";
The same way you create and assign any variable.
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