$_SESSION['home']

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Chalks
Forum Contributor
Posts: 447
Joined: Thu Jul 12, 2007 7:55 am
Location: Indiana

$_SESSION['home']

Post by Chalks »

Does $_SESSION['home'] have some special significance that I don't know about? My session won't keep track of it if it's named "home"... :banghead:
User avatar
phdatabase
Forum Commoner
Posts: 83
Joined: Fri May 28, 2010 10:02 am
Location: Fort Myers, FL

Re: $_SESSION['home']

Post by phdatabase »

Not that I'm aware of.
User avatar
Chalks
Forum Contributor
Posts: 447
Joined: Thu Jul 12, 2007 7:55 am
Location: Indiana

Re: $_SESSION['home']

Post by Chalks »

actually, I narrowed the error down:

If I have:

Code: Select all

$_SESSION['home'] = "/$u";
$_SESSION['saltine'] = $data['saltine'];
it works fine. But if I have

Code: Select all

$_SESSION['saltine'] = $data['saltine'];
$_SESSION['home'] = "/$u";
then print_r($_SESSION); returns "Array([saltine]=>"aslkdjf@#$@#$lkjfd /username")"

which I don't understand.


edit: $data['saltine'] is just 50 random characters.
User avatar
phdatabase
Forum Commoner
Posts: 83
Joined: Fri May 28, 2010 10:02 am
Location: Fort Myers, FL

Re: $_SESSION['home']

Post by phdatabase »

It appears that $data['saltine'] is somehow closing the array syntax. I would check it for extraneous characters, perhaps ')' or a missing quote or an extra one. Since it works one way and not the other, the error must be in the saltine line.

Have you echoed the $data['satine'] so you know exactly what's in it?
Post Reply