+ 1

Can i work with SESSIONS?

I just tried to work with session. I get errors like session already started, you don't have permission to write.. Is it possible to do a simple script with SESSIONS? (i tried to do something where if you don't have username session than it will show a simple post form, but it don't work..)

5th Mar 2018, 11:04 PM
Dan Bulant
Dan Bulant - avatar
2 Answers
+ 1
I also tried it and seems sessions cant be declared on sololearn's editor. Here is a code that should work in anothrer coding enviromment, just dont forget to declare session_start before anything else. https://code.sololearn.com/wOKJRHkKrceR/?ref=app
6th Mar 2018, 4:54 PM
MĂĄrio Santos
MĂĄrio Santos - avatar
+ 1
It's because the forms fails... Just try to do $_GET or POST... But it seems like it's using online tool so it cannot assign sessions because of you can cheat usernane session...
9th Mar 2018, 9:38 PM
Dan Bulant
Dan Bulant - avatar