php if session is == code example Example: php start session if not started if (session_status() == PHP_SESSION_NONE) { session_start(); }