saxsux
|
posted on 11.2.2004 at 13:13 |
|
|
[request] Javascript Password Protect
Hi. I'm making an .HTA program, and I need a password script.
I was hoping that when the user first uses the program it asks them what they want thier password to be and writes it to a .TXT file.
Then, the next time the user opens the program it asks them to enter the password, and if the password from they entered doesn't match the one in the .TXT file, it wont let them in.
I'lll put full credit in if you want.
Sorry if this isn't very clear,and thanks in advance.
saxsux
|
|
|
Janny
|
posted on 11.2.2004 at 16:27 |
|
|
I can only offer you an asp quick solution.
code:
<%
dim pass
pass = "realpassword"
password = request.form("password")
%>
<%
if password = pass then
%>
<%
response.redirect("success.asp")
%>
<%
Else
%>
<%
response.redirect("Failed.asp")
%>
<%
end if
%>
|
= Nothing Worth Saying =
|
|
|
Mark
|
posted on 11.2.2004 at 17:47 |
|
|
How will you be securing that txt file?
|
| Mark
|
|
|
saxsux
|
posted on 11.2.2004 at 20:37 |
|
|
quote: Originally posted by Mark
How will you be securing that txt file?
It might sound stupid, but I don't want to secure the file!
It's just for a friend, who wanted a password to stop his sister getting into the software (long story, don't ask), neither of them are very computer literate, so it doesn't need to be too secure.
|
|
|
Mark
|
posted on 11.3.2004 at 12:02 |
|
|
Hmm. Easy way out: store the passwords in the code itself, no customization, okay, but it'll work.
No idea how to do the other option, never really used HTA's / JScript's possibilities to write to the filesystem. You might try http://www.dhtmlcentral.com/
|
| Mark
|
|
|
saxsux
|
posted on 11.3.2004 at 12:29 |
|
|
|
|