0
votes

I already read this question and this question.

I was planning to make this

enter image description here

I am working on static html(s) with lots of HTML and files like this:

http://i.stack.imgur.com/FXEoP.png

In order to create an "enter the site, write down the given password", I need to create a different .html.

If the user entered the password correctly, they will be redirected to the main site (on this case, they will be redirected to here.html) and if the password is wrong, the user will stay on the same page until they write a correct password.

How to make that function/password page?

I want the user unable to dig out by the source to find out the password. It will be just simple password.

1

1 Answers

0
votes

If you want to keep the password secret, then you cannot give it to the browser (since anything you give to the browser, you give to the user).

This means that you must check the password using server side code.

The closest you could come without using server side code would be to make the password part of the URL. If the wrong password was entered, the user would go to the wrong URL and get a 404 error.