Quantcast
Channel: Cookies vs. sessions in PHP - Stack Overflow
Browsing latest articles
Browse All 16 View Live

Image may be NSFW.
Clik here to view.

Answer by Muhammad Bilal for Cookies vs. sessions in PHP

See the illustration to compare differences b/w Cookies and Session.

View Article



Answer by Abel Callejo for Cookies vs. sessions in PHP

TL;DRCriteria / factorsSessionsCookiesEpoch (start of existence)Created BEFORE an HTTP responseCreated AFTER an HTTP responseAvailability during the first HTTP requestYESNOAvailability during the...

View Article

Answer by Jay-R Joseph Gabunada for Cookies vs. sessions in PHP

Cookies and Sessions are used to store information. Cookies are only stored on the client-side machine, while sessions get stored on the client as well as a server.SessionA session creates a file in a...

View Article

Answer by Fifi for Cookies vs. sessions in PHP

Short answerRules ordered by priority:Rule 1. Never trust user input : cookies are not safe. Use sessions for sensitive data.Rule 2. If persistent data must remain when the user closes the browser, use...

View Article

Answer by Megersa for Cookies vs. sessions in PHP

A session is a group of information on the server that is associated with the cookie information. If you're using PHP you can check the session. save _ path location and actually "see sessions".A...

View Article


Answer by Muhammad Sanaullah for Cookies vs. sessions in PHP

I personally use both cookies and session.Cookies only used when user click on "remember me" checkbox. and also cookies are encrypted and data only decrypt on the server. If anyone tries to edit...

View Article

Answer by Wasiq Mahmood WM for Cookies vs. sessions in PHP

I will select Session, first of all session is more secure then cookies, cookies is client site data and session is server site data.Cookies is used to identify a user, because it is small pieces of...

View Article

Answer by Kamalakannan J for Cookies vs. sessions in PHP

As others said, Sessions are clever and has more advantage of hiding the information from the client.But Cookie still has at least one advantage, you can access your Cookies from Javascript(For example...

View Article


Answer by user3824494 for Cookies vs. sessions in PHP

Session and Cookie are not a same.A session is used to store the information from the web pages. Normally web pages don’t have any memories to store these information. But using we can save the...

View Article


Answer by user379888 for Cookies vs. sessions in PHP

Sessions allow you to store away individual pieces of information just like with cookies, but the data gets stored on the server instead of the client.

View Article

Answer by Makan for Cookies vs. sessions in PHP

when you save the #ID as the cookie to recognize logged in users, you actually are showing data to users that is not related to them. In addition, if a third party tries to set random IDs as cookie...

View Article

Answer by Zalaboza for Cookies vs. sessions in PHP

SESSIONS ENDS WHEN USER CLOSES THEIR BROWSER,COOKIES END DEPENDING ON THE LIFETIME YOU SET FOR IT. SO THEY CAN LAST FOR YEARSThis is the major difference in your choice,If you want the id to be...

View Article

Answer by user743234 for Cookies vs. sessions in PHP

Basic ideas to distinguish between those two.Session:UID is stored on server (i.e. server-side)Safer (because of 1)Expiration can not be set, session variables will be expired when users close the...

View Article


Answer by DOK for Cookies vs. sessions in PHP

Actually, session and cookies are not always separate things. Often, but not always, session uses cookies.There are some good answers to your question in these other questions here. Since your question...

View Article

Answer by Fosco for Cookies vs. sessions in PHP

The concept is storing persistent data across page loads for a web visitor. Cookies store it directly on the client. Sessions use a cookie as a key of sorts, to associate with the data that is stored...

View Article


Cookies vs. sessions in PHP

I started using PHP a couple of months ago. For the sake of creating a login system for my website, I read about cookies and sessions and their differences (cookies are stored in the user's browser and...

View Article
Browsing latest articles
Browse All 16 View Live




Latest Images