Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6633975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:52:33+00:00 2026-05-25T22:52:33+00:00

Ok, yes, I’ve read the other Qs regarding this topic, but I have several

  • 0

Ok, yes, I’ve read the other Qs regarding this topic, but I have several questions more and some Qs were several years old.

Anyways, I’m building an admin cp for an insurance company that contains sensitive client info. Such as passwords, social security numbers, and drivers #.

First Q:
What’s more secure, php sessions or cookies? From my understanding of cookies, you can strict them to http only and SSL. Don’t know if you can do the same with php sessions. Seems also that php sessions are just quick cookies. Cookies seem more flexible and just as reliable. FYI, I’m using Cookies with http and SSL only. Is there a good reason to use php sessions in MY case?

Second Q:
My sessions/login work like this:
* Passwords are salted and hashed
* Sessions are 32 random chars long
* Sessions are validated when user enters correct pw and are tied to the user’s IP
* When a user logs in, the session id and user’s password are stored in 2 separate cookies

If the sessions are validated via user pw and tied to the user’s IP, can I just have the session Cookie and remove the pw cookie? since I think it’s kinda redundant since you can only get a session id if you enter the correct PW. I rather have the session id expose in a cookie than the pw (though it’s still salted and hashed).

Appreciate it if my two Qs can be answered. Additional security advice is welcomed 😀

Note: Sessions are tied to IP because it increases security greatly. I rather have my users a bit inconvenienced in having to enter their pw when their IP changes when we have SSNs and Driver License #s in our db. Only 3-5 users will have access to the system too.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T22:52:34+00:00Added an answer on May 25, 2026 at 10:52 pm
    • Do not ever store the user’s password in a cookie, in no form of representation.
    • Regenerate the session ID often
    • Use strong hashes (no MD5) like SHA512 (consider also stretching the hash)
    • Sensitive data should be on the server-sided session store:
      • Cookies are sent along every request to the cookies domain, hence increasing the chances of being intercepted greatly. Server sided session data is only outputted when needed.
    • Pass along a session-tied identifier to each sensitive request as an auth token to avoid CSRF
    • Do not directly bind the session to an IP. Two people using the same AP or private ISP have the same IP and sessions could be mixed up.
    • SSL is not magical. Don’t relay on it too much.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Yes, this is an old topic, but I still have some confusions. In Java,
Yes, I have seen the other questions and i have read through them and
Yes, I have already asked this question, but the problem is much more specific.
Yes, I've read the countless questions regarding the very same problem. My code is
yes this question is asked some times. but I can't find an answer for
Yes, I have seen this question, but I am still finding myself confused: How
Yes you read that right. I feel a little silly asking this but haven't
Yes, I did read the 'Related Questions' in the box above after I typed
Yes, yes, I've weighed using an xml parser instead of regular expressions, but this
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.