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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:22:05+00:00 2026-06-11T10:22:05+00:00

I have a page that I would like to password protect. This page should

  • 0

I have a page that I would like to password protect. This page should be accessible if the user hits the URL http://www.webpage.com/page.php It will be emailed to the user along with a verification code.

I have most of the page written with jQuery. I would like to know how I can prevent access to the page without a proper password. After the user has entered proper password and has verified it will then display the content.

I tried doing something with jQuery dialog, and hiding the content then showing it after verification, however the user can view the content if they view the source of the page.

How should I go about doing so?

I’m just trying to avoid creating a new page. I guess I will have to use sessions.

  • 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-11T10:22:06+00:00Added an answer on June 11, 2026 at 10:22 am

    You need to do the validation that they are using (the right) password in PHP and only then actually output the content to them. If they don’t have the password, tying to hide it from visibility is a no-win scenario.

    Commonly, Session variables are used for this. The verification script checks the user login/password and it it is accepted, assigns a session variable to the user.

    Then in your actual code (for the secret page) you check against this session variable and if it is there, you go ahead and display the content to the user, if it isn’t matched, you either display an error message or redirect the user off to another page through a header().

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

Sidebar

Related Questions

I have a public facing web page in .Net that I would like to
I have pictures that I would like to have expand across an entire page
I have a div that I would like to reposition each time the page
I have a function that I use on index.php page and I would like
If have an element that maybe disabled on a page, and would like to
I have a set of pages that I would like to ask the user
I have a page that lets the user edit the content of the page
I have two ASP.NET pages: site.com/foo/bar.aspx that should be world accessible and site.com/foo/baz.aspx that
I have an admin page (../index2.php) I would like to log in as my
I am new to Rails. I have a User model. I would like a

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.