VINAYAK COLONY, NEAR CHINKARA CANTEEN, JHUNJHUNU ROAD, CHIRAWA, JHUNJHUNU, 333026
Call Us: +91-8432644113
Admission Enqiury: +91-9829959351
Annual Function
Blog Testing

Explanation:

  1. Start the Session: Each file starts the session with session_start(). This function must be called before any output is sent to the browser.
  2. Login and Set Session: In index.php, after the user submits the form, a session variable user_id is set and the user is redirected to dashboard.php.
  3. Check Session and Display Session ID: In dashboard.php, the script checks if user_id is set in the session. If not, it redirects to the login page. If the session is valid, it retrieves and displays the session ID and user ID.
  4. Logout and Destroy Session: In logout.php, the session is destroyed and the user is redirected to the login page.

This structure ensures that the session is checked at the start of each script, providing a secure way to manage user sessions.

More News

  • Library
    New Library Section Opened

    We have expanded our library with more books and resources.

  • Science Fair
    Science Fair 2025

    Students showcased their innovative projects.

  • Admissions
    Admissions Open for 2025-26

    Apply now for the upcoming academic session.

back-to-top