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 8095229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:03:16+00:00 2026-06-05T21:03:16+00:00

Possible Duplicate: Where are $_SESSION variables stored? When ever we working with session, we

  • 0

Possible Duplicate:
Where are $_SESSION variables stored?

When ever we working with session, we need to start the session in each page. now suppose i have set the session in 1.php now redirecting to 2.php, in 2.php page i am starting the session again there is no any link between 1.php and 2.php. 2.php is not knowing what is the session id of 1.php.

Now my question is How this 2.php is getting the same session id started by 1.php. Where this session is stored? how it is working?

Here we are not passing any parameter from 1.php to 2.php, as Frederick Marcoux is saying SESSION_START() is IGNORED by 2.php. So how 2.php will get to know that session is already running.

if it is on server side,then in case of multiple session then how will it identify which session is for which request?

  • 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-06-05T21:03:18+00:00Added an answer on June 5, 2026 at 9:03 pm

    Think of it this way….

    When someone accesses your 1.php page, the session_start() on the top of the page initiates an action on your server (hosting) and unique session id is generated.

    Then it is attached to every page (url) on your server (under the same domain) (i.e.: 2.php or 3.php) and if these pages have the session_start() function present, the SID is available for the scripts (on those pages) and can be accessed and verified.

    If the SID on your page 3.php is matching the one created/generated by the same user when he/she accessed the page 1.php then you know that this page is being accessed by the same person and do something else for them which you would not do for a visitor who got directly to the page 3.php and did not obtain the necessary SID for example.

    The SID is passed from the server to your browser and kept as cookie until it is cleared or it expires.

    ( …did I diluted it down to much ? 🙂

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

Sidebar

Related Questions

Possible Duplicate: Text box validation not working Right now I have 5 text boxes
Possible Duplicate: PHP Can a client ever set $_SESSION variables? What I'd like to
Possible Duplicate: Where are $_SESSION variables stored? I'm using this to store some data
Possible Duplicate: What do I need to store in the php session when user
Possible Duplicate: PHP: Cookie domain / subdomain control I have tow page a.php and
Possible Duplicate: Can't pass mysqli connection in session in php Many of us have
Possible Duplicate: Errors for changing variables content depending on session status Hello! I am
Possible Duplicate: Cache v.s Session when where we have to use Cache when where
Possible Duplicate: How do I continue a session from one page to another with
Possible Duplicate: PHP Session Fixation / Hijacking I've been using $_SESSION superglobal a lot

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.