ankurraheja Posted March 14, 2007 Share Posted March 14, 2007 I have a line of code $_SESSION['name']=$name - What does PHP do when it stores the $name in the session? What I see in the cookie is only a string of random characters... - Can I read the cookie and tell what is stored in it or can I use PERL or Java to read this cookie and get the actual value of $name ? - Is there some kind of encoding or encryption used and how can it be reversed, without using PHP ? Quote Link to comment https://forums.phpfreaks.com/topic/42619-sessions-cookies/ Share on other sites More sharing options...
The Bat Posted March 14, 2007 Share Posted March 14, 2007 The random characters in the session is the encrypted value of it. To display the un-encrypted value, just do <?php echo $_SESSION['name']; ?> So if $name was, for instance, 'Andrew', then the above code would display 'Andrew'. Quote Link to comment https://forums.phpfreaks.com/topic/42619-sessions-cookies/#findComment-206833 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.