Jump to content

$_session help


herghost

Recommended Posts

For the last few hours I have been pulling my hair out on a session not storing when I moved from local host to my vps.

 

I have been setting sessions like:

 

$_SESSION['mydata'] = $variable;

 

This works no problem on my wamp installation.

 

However to get it to work on my vps, I have to store them like this

 

$_SESSION[mydata] = $variable;

 

Can someone please explain to me why this is the case?

Link to comment
https://forums.phpfreaks.com/topic/219519-_session-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.