I am beginning to learn php. I have a question regarding sessions.
Right now, I know that session_start() creates a session variable.
What I don’t know is, when I access the session I created, do I need to use session_start() again?
If yes…
Why is this? Because I already created a session and I wonder why it wouldn’t last the entire browsing session.
No:
Each new page you visit is an entirely new context for PHP.
session_startallows you to reestablish a previous context/session/data.