can anyone please give me the code (or point me in the right direction) to be able to password protect a web page with javascript that gets the usernames and passwords from a database and displays a message if the entered password or username is wrong and points the user to a page if it is correct. and i also want it to create a cookie so that the user doesn't have to put in his/her password all the time.
can anyone help me out please!

can anyone please give me the code (or point me in the right direction) to be able to password protect a web page with javascript that gets the usernames and passwords from a database and displays a message if the entered password or username is wrong and points the user to a page if it is correct. and i also want it to create a cookie so that the user doesn't have to put in his/her password all the time.
can anyone help me out please!

You can't do that with pure Javascript, you need some server side script to work with you for that

This question has already been answered. Start a new discussion instead.