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

  • SEARCH
  • Home
  • 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 876447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:25:56+00:00 2026-05-15T11:25:56+00:00

Excerpt from http://php.about.com/od/advancedphp/ss/php_sessions.htm : So how will it know it’s me? Most sessions set

  • 0

Excerpt from http://php.about.com/od/advancedphp/ss/php_sessions.htm:

So how will it know it’s me? Most sessions set a cookie on your computer to uses as a key… it will look something like this: 350401be75bbb0fafd3d912a1a1d5e54.

My question is, in PHP, how to generate a key (e.g., 350401be75bbb0fafd3d912a1a1d5e54) for a session cookie?

And when do we need such a key? Why not just set $_SESSION['color']='red' in the first page and retrieve in the second page with $_SESSION['color']?

  • 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-15T11:25:56+00:00Added an answer on May 15, 2026 at 11:25 am

    how to generate a key (e.g., 350401be75bbb0fafd3d912a1a1d5e54) for a session cookie?

    Just call session_start() for this. A key would be generated automatically

    when do we need such a key?

    when session starts, to distinguish one user from another

    Why not just set $_SESSION[‘color’]=’red’ in the first page and retrieve in the second page with $_SESSION[‘color’]?

    This is the way sessions works. You are encouraged to do it this way. Who says you can’t do it?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is an excerpt from my code: xtype: 'image', src: 'http://www.sencha.com/files/blog/old/blog/wp-content/uploads/2010/06/sencha-logo.png', left: '50%', top:
I'm trying to translate the following slugify method from PHP to C#: http://snipplr.com/view/22741/slugify-a-string-in-php/ Edit:
Except https://www.php.net/manual/en/book.ktaglib.php and http://getid3.sourceforge.net/ does anyone know of any other way to work from
Here's an excerpt from a book I'm reading about application design with MVC: Ideally,
So, I implemented a voting system http://ad1987.blogspot.com/2009/02/reddit-style-voting-with-php-mysql-and.html on my website. It works perfectly, except
Here's the page: http://nm-bootstrap.gydev.com/course-delivery.php Both the chevron toggle icons and the bookmark icons on
Here's an excerpt from Live HTTP headers, I've replaced several values for anonymity. POST
Excerpt from a book: A float value consists of a 24-bit signed mantissa and
Excerpt from my JavaScript console: > 0 in [1, 2] true Why?
Here is excerpt from my larger JavaScript file: function dashboardConfig() { $(window).on('resize', 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.