-
Are sessions necessary to provide program to users?
Hello,
I'd like to provide registered users with a simple application where they would log in relevant data from time to time, and keep track of it over a period of months. Each user would have his or her own account, and be able to retrieve his or her own data (but no one else's).
Will it be necessary to use sessions in order to provide that?
-
-
no, but it would be far easier.
for example, sessions are typically used to keep track of a user's actions across several pages.
-
-
Sessions are not directly related to what you are describing. Sessions are temporary storage for a single "visit" to your website. In this sense, they are not reliable for storing data. You need a database (or flat files) that is permanently stored on the server.
As Traq says, though, sessions are very helpful for a lot of user management issues such as logins, temporary storage/organization of data, and tracking.
A typical site like you describe would have both.
However, a lot also rely on cookies alone and store everything aside from the login info in the database.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
-
traq and djr, thank you for your replies.
I guess what I'm trying to understand is what an "account" is. And how sessions are different.
A user has an account, acquired through registration. Which means, I take it, that he or she owns a piece of real estate in the database. (so to speak)
He or she logs in. Which means, I take it, that he or she now has some form of "access" to the database. (What would be the correct term?)
He enters some new data through a form, and it is stored in the database. He then goes to a different page and, using a form, retrieves some of his previous data. He goes to a third page and edits one of his previous entries.
On each of those three pages, he is accessing, in one way or another, the database.
Are sessions necessary to any of that activity? what would cookies or sessions add, if anything, to that basic scheme?
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks