hamza Posted March 22, 2010 Share Posted March 22, 2010 i want to store cart variable in session plz guide me about that what is a correct way to encrypt or decrypt or hasshing?? Quote Link to comment https://forums.phpfreaks.com/topic/196174-php-session/ Share on other sites More sharing options...
Jax2 Posted March 22, 2010 Share Posted March 22, 2010 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']; Quote Link to comment https://forums.phpfreaks.com/topic/196174-php-session/#findComment-1030241 Share on other sites More sharing options...
hamza Posted March 23, 2010 Author Share Posted March 23, 2010 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... Quote Link to comment https://forums.phpfreaks.com/topic/196174-php-session/#findComment-1030412 Share on other sites More sharing options...
oni-kun Posted March 23, 2010 Share Posted March 23, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/196174-php-session/#findComment-1030413 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.