/    Sign up×
Community /Pin to ProfileBookmark

js pswd protected html page

I am trying to create a form for my friends website where he can write his blogs that will be posted with php. I want to set up a page with the form that only he can access. How can I use js to password protect this one html page? I am not good with javascript at all, so keep that in mind when responding to this post.

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@bathurst_guyJul 10.2005 — Well if your not good with js i wouldnt use it, there is a much better way just using your server.

Put this file in its own folder on your site then create a .htaccess and .htpasswd file and put in this folder. The contents of the folder can only be accessed by those who have the correct user and pass.

http://www.webmaster-toolkit.com/htaccess-generator.shtml

Oh note: your path isnt http:// etc its the path on your server

eg.)

/srv/www/username/public_html/folder/.htpasswd
Copy linkTweet thisAlerts:
@jmcdonald21authorJul 10.2005 — If it can be done with javascript I would still like to know how. I think it will help me learn it. I want to get good with javascript I am just having some trouble with certain things. This being one of them. Thank you for the suggestion though. I will try it out also.
Copy linkTweet thisAlerts:
@UltimaterJul 10.2005 — It can be done in JavaScript via the SHA1 (Secure hash Algorithm). But the algorithm [i]can[/i] be broken and there are rumors that it has been but it's still quite secure. When I get some free time after finishing JS Falcon 2, I'll try to crack it again.
×

Success!

Help @jmcdonald21 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...