1

I use _SESSION in many parts of my application, but for some reason, my error logs keep having this line in there:

Undefined variable: _SESSION

Does anyone know why it outputs that and how I can stop that?

0

2 Answers 2

4

Hm... did you try

session_start();

on the first line?

Sign up to request clarification or add additional context in comments.

Comments

2

it should be $_SESSION not _SESSION

2 Comments

I thought that was it - but actually, here is what I use: $variablexyz = $_SESSION['param'];
then as @royrui says. You should start with session_start();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.