Jump to content

php session


hamza

Recommended Posts

As far as I know, session variables are server side meaning they're completely secure, so just use $_SESSION['variable']="data"; and call it back same way:

 

$variable = $_SESSION['variable'];

 

 

 

if it is safe then why people encrypt it...

Link to comment
Share on other sites

if it is safe then why people encrypt it...

 

Sessions are secure, as the only thing the user can see is the cookie set with the session ID, They cannot view the actual sessions unless there is a major flaw in your programming. It's standard and conventional programming to not encrypt/hash session variables (See PHP documentation in my sig) and you may use them for whatever you wish, but it should only relate to the current acting session.

 

Storing the user's credentials, credit card info, password etc. are things not to store in active sessions, but they are otherwise as safe as you make them.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.