By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,869 Members | 1,756 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,869 IT Pros & Developers. It's quick & easy.

Need username/password setup help

P: 8
I'm adding some pages to a website for a client and one of the options the client wants is for his employees to be able to login into a separate page for employees only, where they can retrieve information such as monthly schedules, etc. The person who created the website originally had made a link that would take you to that page. When you click on the link it prompts you to enter a password, but when you're entering the password you can actually see the words you're typing in.

What I need help with is: for each employee to be able to create a username and a password; and when typing in a password I don't want the letters to be visible. Are there premade codes for this somewhere?

If creating a separate username and password for each employee is dealing with too much (such as creating databases) then if somebody could help me with at least creating one same password for every employee to be able to use. The client wants this page (with company info) to be stored on his own server at his main office location.

The code that is currently present is: <a href="staffsite.html" onClick = "whereTo();return false">

Thanks in advance,
AR
Aug 23 '06 #1
Share this Question
Share on Google+
4 Replies


iam_clint
Expert 100+
P: 1,208
use a form and use <input type="password"
instead of <input type="text"

now that thats said, Javascript would be the last way you would want to do username and password logins -- first of all if its client side (javascript) there is not authentication with the server but local authentication whichs means that they can probably view the source of the page and use any of the predetermined logins made by whoever, the way i would go would but with a sql server and a server side scripting language such as PHP or ASP, If this is not an option you may want to look into some way of encrypting the data with possibly MD5 or something of the such.
Aug 23 '06 #2

P: 8
Here is the code that I have for the login icon, it was made by another person who originally created the website (but this website was never up on the internet yet). I'm not sure which platform the client has for his server that he has at his main office location.

function whereTo()
{
var magic_word = prompt("Enter Password","");
if(magic_word == "password")
{window.location = "index.html";}
else if (magic_word == "letmein")
{window.location = "staffsite.html";}
else
{window.location = "index.html";}
}

Then later in the code there's this:
<a href="staffsite.html" onClick="whereTo();return false"><img src="images/tooth.gif" width="51" height="72" border="0"></a>

Is there any help you could give me with this code that I already have?

And if I would need to use a server side scripting language such as PHP or ASP are there codes out there pre-made that I could use (and just revise them)?

thanks,
AR

use a form and use <input type="password"
instead of <input type="text"

now that thats said, Javascript would be the last way you would want to do username and password logins -- first of all if its client side (javascript) there is not authentication with the server but local authentication whichs means that they can probably view the source of the page and use any of the predetermined logins made by whoever, the way i would go would but with a sql server and a server side scripting language such as PHP or ASP, If this is not an option you may want to look into some way of encrypting the data with possibly MD5 or something of the such.
Aug 24 '06 #3

iam_clint
Expert 100+
P: 1,208
There are server side codes for a login script, easy to find on google example search would be ASP login script, another PHP login script..


as to the javascript those passwords are obviously visible just in view source

password takes you to index
letmein takes you to staff

infact you could type www.whateverwebsite.com/staffsite.html

and you would be in without even finding the password -- this is not a secure way of doing it...

you can make the html document itself password protected and not use the javascript merely have a link to it then it will prompt you with a password, if incorrect it gives you access denied.
Aug 24 '06 #4

P: 8
You mentioned that I can have the html document itself password protected, and not use javascript. How would I go about doing that? Is it complex?

Thanks in advance.

There are server side codes for a login script, easy to find on google example search would be ASP login script, another PHP login script..


as to the javascript those passwords are obviously visible just in view source

password takes you to index
letmein takes you to staff

infact you could type www.whateverwebsite.com/staffsite.html

and you would be in without even finding the password -- this is not a secure way of doing it...

you can make the html document itself password protected and not use the javascript merely have a link to it then it will prompt you with a password, if incorrect it gives you access denied.
Aug 24 '06 #5

Post your reply

Sign in to post your reply or Sign up for a free account.