Jump to content
xisto Community
Sign in to follow this  
suicide1405241470

password protection thing

Recommended Posts

Hi Can anybody help me with this little problem i have? Its just a sort of password protectd html page. new to scripting,so give me a chance. Basically i have a enter username/password page. if you dont enter a name or a password it takes you to a please try again page, the same if you get both fields wrong, but if you get it right it also takes you to the try again page. username and password refer to a seperate html page of both names with an _ inbetween. i.e myname_mypassword.html would be correct. the code. <script LANGUAGE="JavaScript"> function checkuser() { var user = document.login.user.value var password = document.login.password.value if (user == "" || password == "") { var doc = "no.html" this.location.href = doc } if (doc !== user + "_" + password + ".html") { var doc = "no.html" this.location.href = doc } else { var doc = user + "_" + password + ".html" this.location.href = doc } } </SCRIPT> function called up with a submit button. Thanks for any help upfront.

Share this post


Link to post
Share on other sites

I tried that also with JavaScript. Problem 1: I still didn't figured out why, but it just didn't work :D , problem 2: if people look at the source-code they can see the passwords, unless you put it in another js file but even then people can find it.
I did some googling for you and this was what I found maybe you should try it:
http://www.bravenet.com/webtools/passwd/index.php

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.