Skip to content

Glossary: PHP Basics

session_start()

Also written: session_regenerate_id, session_destroy

The function that starts or resumes a visitor's session and loads `$_SESSION`. Call it at the top of every page that uses the session, before any output. `session_regenerate_id()` gives a new ID at login and `session_destroy()` ends the session.

Where the book teaches it

Related terms

session$_SESSION