Page 5 of 5

Posted: Sun Jan 21, 2007 4:55 pm
by Mightywayne
OOP...?

Posted: Sun Jan 21, 2007 5:22 pm
by feyd
Object-oriented Programming.

I wouldn't attempt to jump to that until you have a decent grasp on functions first. ;)

Posted: Mon Jan 22, 2007 4:03 pm
by Mightywayne
Ew no, that means I'd have to join a team. (to get anything good)

Anyway. >>; Just thought I'd say everything's working fine now. For the most part. (but I don't want anymore help, I'm a big boi nao)

Now that I'm pretty much set up - are there any pro's or cons, to having used sessions versus cookies? Other than sessions are apparently "easier to work with"?

Posted: Mon Jan 22, 2007 5:28 pm
by Christopher
Mightywayne wrote:Now that I'm pretty much set up - are there any pro's or cons, to having used sessions versus cookies? Other than sessions are apparently "easier to work with"?
Cookies are bad and mean and I hate them, don't use them ... but sessions are like kitties or puppies or ... or is it cookies that are the sweetie-pies and sessions are meanies? Oh, I can't remember big boi...

Posted: Mon Jan 22, 2007 8:46 pm
by Mightywayne
Sorry, I was looking for useful answers, forgot to mention that.

Posted: Mon Jan 22, 2007 8:54 pm
by John Cartwright
I'm with arborint on this (see avatar).

Sessions are much more secure than cookies simply because anyone can write/modify their cookie. With sessions, since only a session identifier (session_id) is stored in a cookie, and the session information stored server side the user does not have access the data.

In a nutshell, sessions are puppies when compared to a strictly cookie based application.

Posted: Mon Jan 22, 2007 8:59 pm
by Christopher
Mightywayne wrote:Sorry, I was looking for useful answers, forgot to mention that.
Oh ... then neither sessions or cookies are "easier to work with." The are different systems that can be used to solve some of the same problems, yet they have their differences and peculiarities and even interrelationship. An understanding of each is fairly easy to achieve and would give you insight into where each might be appropriately appli3d.

Posted: Tue Jan 23, 2007 2:42 pm
by Mightywayne
After viewing this emoticon :google: I just decided to search "cookies vs. sessions".

I figured cookies was what I wanted; sessions just didn't seem right. And here it is...

http://www.hudzilla.org/phpbook/read.php/10_1_0

I'm going to look explicitly into how cookies are stored, and if there's data like...

MONEY: 243543

And they can change it to, oh

MONEY: 4273889482842

Then I of course will have to use sessions. ;) Thank you both and everyone for the help. I didn't much like sessions anyhoo. Let's see how it works with cookies. *crosses fingers*

Posted: Tue Jan 23, 2007 3:05 pm
by Christopher
Mightywayne wrote:I figured cookies was what I wanted; sessions just didn't seem right. And here it is...

http://www.hudzilla.org/phpbook/read.php/10_1_0
A reasonable article except for two points where the author is erroneous. First, you can set sessions to last more than a day if you like so they can allow data to be retained longer. Conversely you can set cookies to expire after a short time if you choose.

Second, it is very easy to implement a database backend to the PHP session manager to allow multiple computers to share the same session across all of those machines (e.g. clusters). There is code to do this freely available around the net. The code is pretty simple.