The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Try out my first PHP web app! Reply To: Try out my first PHP web app!


If cookies work, then sessions should work. Here’s the difference:

With a cookie, you are not storing data at all. You are giving data to the user and trusting them to give it back without changing anything. Cookies are user input, just like form fields.

With a session, you give the user a cookie with an identifier. If they give it back, the server can look up data you’ve stored about them in your session. Done correctly, sessions are safe and reliable.

So, to answer your question, yes, cookies take up memory, but not your memory. Sessions do take up your memory, but they are also secure.

Sessions are a good solution for this issue. Would you like to share the session code that isn’t working?