mfleming Posted October 31, 2010 Share Posted October 31, 2010 Hello. I currently have a site that registered members can login in to and view the member only pages. Eventually I will be adding paypal code to purchase products. I use Session with an IF statement for all my members pages. Would it be beneficial at all to have cookies created for the users with setcookie? Or is this just a security risk waiting to happen? Link to comment https://forums.phpfreaks.com/topic/217328-setcookie-vs-session/ Share on other sites More sharing options...
Pikachu2000 Posted October 31, 2010 Share Posted October 31, 2010 Do you have a specific use for the cookies? What would they be for? Link to comment https://forums.phpfreaks.com/topic/217328-setcookie-vs-session/#findComment-1128517 Share on other sites More sharing options...
mfleming Posted October 31, 2010 Author Share Posted October 31, 2010 The only thing I could think of is if the user has a bookmark of a page inside the members section, they wouldn't necessarily have to login again. Other than that I don't know what else I could use it for. Link to comment https://forums.phpfreaks.com/topic/217328-setcookie-vs-session/#findComment-1128521 Share on other sites More sharing options...
revraz Posted October 31, 2010 Share Posted October 31, 2010 If you want to allow the app to remember them, then use a cookie. If you don't, then don't use a cookie. Link to comment https://forums.phpfreaks.com/topic/217328-setcookie-vs-session/#findComment-1128528 Share on other sites More sharing options...
mfleming Posted October 31, 2010 Author Share Posted October 31, 2010 would adding the cookie create a crap load of extra work in regards to security or is this something most people use on their sites? Link to comment https://forums.phpfreaks.com/topic/217328-setcookie-vs-session/#findComment-1128530 Share on other sites More sharing options...
revraz Posted October 31, 2010 Share Posted October 31, 2010 No extra work really. Poeple use it for various reasons. Link to comment https://forums.phpfreaks.com/topic/217328-setcookie-vs-session/#findComment-1128547 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.