php how to know if session is a session is active or not code example
Example 1: php start session if not started
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
Example 2: php start session if not started
#you could just ignore warnings messages
@session_start();