Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

password protection problem

Status
Not open for further replies.

crowell

Programmer
Jan 17, 2002
19
US
If you are using Linux or Unix, htaccess is the safest way.
But you can also use cookies like this:
On the page where you check the password, set a cookie, something like this:
Response.Cookies("NameOfCookie") = "Validated";
Then on the page they are accessing, use this:
if (Request.Cookies("NameOfCookie") != "Validated")
{
Response.Redirect("loginfailed.html");
}
Maybe something like this will help you.
 
one I like and seems reasonable secure
[lol] at that with client javascript

hi piller
if you really want security then you need to go server side via ASP, PHP etc..
if you have sensitive information (shouldn't be online but...) then you will not wnat to waist the time trying to keep it secure with something so readily accessible by most common users that have a right click button. [wink]

just a bit of advice. ---------------------------------------
{ str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee");alert(Nstr); }
---------------------------------------
for the best results to your questions: FAQ333-2924

 
You should of course use the cookies server-side using asp.
Sorry I did not mention that.
 
From Piller: Thank you. After playing a little with javascript, I can see what you mean but I have very limited ability to even know how to go "server-side" but it sounds like I'm about to start learning something new and very complex but it sounds like the way to go. The info I have is not all that "in need of protection." Thank you for your time, I'm sure you have more complex issues at hand. I'll keep reading and learning but may ask a few q's here now and then. Off to the books......
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top