|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi,
I would like to add a few more ids and passwords to the following code. What would be the most efficient way of doing so? Thanks! /*This Script allows people to enter by using a form that asks for a UserID and Password*/ function pasuser(form) { if (form.id.value=="Jon") { if (form.pass.value=="Dapron") { location="members/index.asp" } else { alert("Invalid Password") } } else { alert("Invalid UserID") } } |
|
||||
|
Quote:
I'm not a big fan of this method...since it makes it difficult to change, or to add users/passwords. I would build it so that the usernames and passwords are stored in a database...and the login is verified by checking the database. Not sure what tools you are using to build the page...but Dreamweaver has good components for applying this type of login to a page. Your other option would be: if (form.id.value=="Jon" || form.id.value=="Sue" ) {
__________________
Ed Siegel - Business Information Manager Ampacet Corporation http://www.Ampacet.com |
|
|||
|
Thanks for the reply! I have access to a MySQL database and my files are all active on a Windows server hosted by ipowerweb. I can not set the permissions, so using php scripts, I could not turn off all of the gibberish code that was displayed at the top of the screen during the login process. Any script suggestions? Thanks in advance.
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |