• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Userdata

Hamed

Active Member
I am coding new script I want to know which way is better for saving userdata session or cookie?And Why?
 
session is a cookie, but php does the leg work for you.

I use both normally, combining then for session data for queries, and the cookies to store the users login to "remember" them.
 
I tend to use sessions. Cookies are better for remembering users as they get deleted on a time limit.
 
JohnN said:
session is a cookie, but php does the leg work for you.
I don't get it... how is session a cookie? Session is all server side stuff. It is a little bit more secure than a cookie. There are still session hijackers (cookie too I believe). The trick is to hash the session to make it a bit more tricky for people to hijack it etc. :D

TBH I would go with making things in CodeIgniter. http://codeigniter.com
 
I don't get it... how is session a cookie? Session is all server side stuff. It is a little bit more secure than a cookie. There are still session hijackers (cookie too I believe). The trick is to hash the session to make it a bit more tricky for people to hijack it etc. :D

TBH I would go with making things in CodeIgniter. http://codeigniter.com

php stores the session as a cookie by default, failing that it uses the URLs.

to check this simply visit a site then check your cookies for PHPSESSIONID or something like that.
 
Back
Top