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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User and Input problem

Status
Not open for further replies.

Oxymoron

Technical User
Dec 17, 2000
168
GB
hi y'all
I have a problem at the moment.
I warn you now it is a problem with many..'sub problems' but if anyone could suggest anything for any of them I'd be most grateful.
Here's the deal, I have a website, which people can sign up for as memebers ( This means I have to manually add them to a list.
I have a VB Script inputbox, where they type their username, and this sends them to their own page where there is another inputbox, where they type their password. This is all very complex, and irritating to update, as I have about 10 ppl a day sign up, and little time to update.

Now, is there anyway, I could have one HTML page with VB script code where it could declare both variable, both username, and password. e.g If user=joe, then dim pass, if pass=eoj then enter (in the simplest sense), and make this possible for multiple users.

I appreciate this question may be tricky to understand, but I would be MOST grateful if anyone could help!!
Cheers
JOE
 
Well Joe, while it is possible to make some type of HTML page to do what you what, it is a) insecure and b) an extreme pain.

Do you have .ASP access? It would be a lot easier to create a file on the server that holds usernames and passwords and authenticates the user against them. There are plenty of example scripts to do just that.

If you do insist on doing authentication in the web browser with vbScript I would create an array of users and passwords:

dim users( 0 to 9, 0 to 1)
users(0,0) = "Fred"
users(0,1) = "FredPass"
users(1,0) = "Bob"
users(1,1) = "BobPass"

when the user enters a username and password

login=false
for i = 0 to ubound(users)
if users(i,0) = username_entered then
if users(i,1) = password_entered then
login=true
end if
end if
next

if (login) then
document.location = 'authenticated.page'
else
document.write 'Invalid password'
end if
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top