I’m developing my first web-based app (I guess you could call it that), but I’m struggling to decide between sessions and cookies.
I’ve got a simple login form, and I want an easy way to check if the user is logged in etc. I’ve used cookies in the past, but I’ve also heard of sessions. I’ve read up about them on the PHP manual, but it hasn’t helped me so far.
I’m hoping to implement part of the system in an iPhone App down the road, so I’m not sure how I’ll authenticate that, maybe one of these would be easier to implement?
I’ve looked at the other posts on here, but I’m still not clear on the pro’s and con’s for this situation.
Any help is much appreciated 🙂
I’m developing my first web-based app (I guess you could call it that), but
Share
“Sessions” are arguably the most common approach. Personally, I’d vote for “PHP sessions” unless you had a very good reason not to.
Here are a couple of links that might hel[p:
http://tuxradar.com/practicalphp/10/1/0
http://www.phpshare.org/articles/Cookies-versus-Sessions