Cant use if($_SESSION)

Hello.
On my local server I look if session is started with

if(!$_SESSION){ session_start(); }

I can’t use it on 000webhost, but get error

Undefined variable: _SESSION

Can I write it so it works?

Greetings

Oh I found it was just a PHP notice, something else caused the page to stop…

1 Like