orange08 Posted September 30, 2009 Share Posted September 30, 2009 with my browser cookie disabled, i browse some site, when i'm not login to the user account, then it's ok and no problem. when i want to login, it will ask me to enable my browser's cookie, it's clear that it need the cookie for the session... so, i just want to know, before i'm login, the site still can run without session created(no cookie enabled at that time), how they pass/store their temporary data? in another word, how can i pass data without session? Quote Link to comment https://forums.phpfreaks.com/topic/176065-solved-no-session-before-login/ Share on other sites More sharing options...
otuatail Posted September 30, 2009 Share Posted September 30, 2009 If a website requires you to have a cookie on your PC then you will have to enable it. Some websites will store information in a session if you don't have it enabled. Others will not let you browse without cookies enabled. Desmond. Quote Link to comment https://forums.phpfreaks.com/topic/176065-solved-no-session-before-login/#findComment-927707 Share on other sites More sharing options...
JonnoTheDev Posted September 30, 2009 Share Posted September 30, 2009 Data can remain persistent throughout HTTP via GET & POST i.e. Url Parameters, hidden form fields. Access to a secure area of a website will require a session to maintain your login. Some use cookies to maintain a persistent login (you return after your session is lost). You would never pass customer sensitive data through GET or POST requests. Quote Link to comment https://forums.phpfreaks.com/topic/176065-solved-no-session-before-login/#findComment-927715 Share on other sites More sharing options...
cags Posted September 30, 2009 Share Posted September 30, 2009 Touching on whats been covered so far. Sessions are essentially a cookie that is stored on the server as opposed to the client PC. In order to associate that client PC with the correct cookie, sites use a SESSION_ID. By default SESSION_ID's are stored on the client PC as a cookie. That's not the only way of doing it (just the simplest), it's possible to persist the SESSION_ID using a GET or POST variable. Quote Link to comment https://forums.phpfreaks.com/topic/176065-solved-no-session-before-login/#findComment-927720 Share on other sites More sharing options...
eatfishy Posted September 30, 2009 Share Posted September 30, 2009 I think using Session to store data on server side is the safest, but if you want to pass data without Session. I would recommend using $_GET['variable'] Quote Link to comment https://forums.phpfreaks.com/topic/176065-solved-no-session-before-login/#findComment-927731 Share on other sites More sharing options...
orange08 Posted September 30, 2009 Author Share Posted September 30, 2009 ok, thanks guys... i know what to do now. Quote Link to comment https://forums.phpfreaks.com/topic/176065-solved-no-session-before-login/#findComment-927756 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.