View Single Post
  #2 (permalink)  
Old 11-22-07, 02:49 AM
mab's Avatar
mab mab is offline
Community VIP
 
Join Date: Oct 2005
Location: Denver, Co. USA
Posts: 2,674
Thanks: 0
Thanked 0 Times in 0 Posts
Javascript cannot be used to create a login function. Anything that you do in the browser can be viewed by the visitor and is not secure. For example, you did not really need to post the code for BusinessLogin.js because anyone can get it from the web site itself. They can see the URL of the successful login page and enter that directly without ever bothering to enter any username or password. All the usernames and passwords are also visible in the code and any visitor would know all the usernames and passwords for everyone that you have set the site up for. If someone used the same username and password on your site that they use elsewhere, someone now knows what all those values are. Maintaining the list of usernames and passwords also requires changing the actual .js file every time you add, modify, or remove a value.

A secure login function can only really be done on the server, where the usernames and passwords are stored out of the hands of a visitor.
__________________
Error checking, error reporting, and error recovery. If your code does not have these to get it to tell you why it is not working, what makes you think someone in a programming forum will be able to tell you why it is not working???
Reply With Quote