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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:47:33+00:00 2026-06-08T06:47:33+00:00

I am currently working on developing a simple web system, so an user first

  • 0

I am currently working on developing a simple web system, so an user first will be directed to a login page, then a processing page. If its account data provided is correct, it will be directed to the main page, so it can carry out some actions, at last it can logout.

So what I want to ask is: how can I prevent user to access the processing, main or logout page before they login, I mean, if I do not limit it, the login action is by some means useless. I am using wamp to develop the web system.

I have considered making use of the session variable, however, I have no idea how to check the value of the variable. If I start a session at the login page, so if I skip the login page but directed go to the main page, do I have those session variable present in the main page?

  • 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-08T06:47:34+00:00Added an answer on June 8, 2026 at 6:47 am

    1) Add session_start(); at the top of the php page to initialize sessions.

    2) Add if statement

    if($_SESSION['logged_in'] == 1) { ..show page.. } else { show login page }
    

    3) Create a login form which validates data, if data is correct then it adds $_SESSION['logged_in'] = 1; and redirects to profile page with logout button.

    That’s all :)!

    I suggest that you check some tutorials, since it will give you some more information how to do that – http://www.intechgrity.com/create-login-admin-logout-page-in-php-w/ or any other link via google – “How to create login/logout functions with SESSIONS”.

    About your question, in each page you will put session_start(); at the start of the file, they will have all sessions you have specified for user.

    EDIT:

    Added few useful links –

    http://www.php.net/manual/en/book.session.php

    http://www.tizag.com/phpT/phpsessions.php/

    http://www.w3schools.com/php/php_sessions.asp

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

Sidebar

Related Questions

I'm currently working on developing a custom keyboard app that will be optimized for
I'm currently working on some school project; we are developing a simple RPG, but
I'm currently working on developing a windows service which will be deployed to all
We are currently developing a user based web application in java. A user can
SO. I'm working with the OCS UCCAPI, developing a custom OCS client. I'm currently
Currently working for the first time with JSON and with little experience of jQuery.
I'm currently developing a web application designed for the administration of vending machines and
I'm currently developing a simple 2D game for Android. I have a stationary object
I'm currently working a contract for a company which will be moving an access
I'm currently developing a payment module, which is already working fine, even managed to

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.