redho home | products | services

Programming Forums


Community for Java, PHP, Perl C, ASP and Python programmers
Thursday 21 November 2019 00:44

Ask your IT question here

Login Code



 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Programming Forums -> JavaScript forum
View previous topic :: View next topic  
Author Message
Jony
Enthusiastic Coder


Joined: 18 Mar 2005
Posts: 71
have a website I am building for school. It is done in Frontpage.. ya go ahead and laugh but I had no choice. I would like to add a login for members of the site and I found a code in javascript that works for one name and password but I'm not sure how to add more names and passwords.. what I have tried hasn't worked. Does anyone have a code or know how to add to this one?? Any help would be appreciated.

function authUser(form) {
if (form.Username.value=="kookie09") {
if (form.Password.value=="flossy") {
location="Local Clubs.htm"
} else {
if (form.Username.value=="giggen") {
if (form.Password.value=="celica") {
location="Local Clubs.htm"
} else {
location="UnAuthorized.html"
}
} else {
location="UnAuthorized.html"
}
}

Reply with quote
 
Jake
Enthusiastic Coder


Joined: 15 Mar 2005
Posts: 68
You definitly DO NOT want to use javascript for 'login' functionality.

This is because anyone hitting 'view -> source' will see the usernames and passwords.

You really want some sort of SERVER SIDE scripting for this.

Javascript login scripts are unheard of... simply because they offer no security what-so-ever.

Reply with quote
 
Krabik
Enthusiastic Coder


Joined: 15 Mar 2005
Posts: 62
kookie09 wrote:
I have a website I am building for school.


Just out of interest, what kind of school is it?

It's a jolly bad idea as rob says. Rather like hiding your key under the door mat. Anyone who wanted to break in would have a quick look there, just to see if you were really careless enough with your security to leave it there.

Reply with quote
 
Jony
Enthusiastic Coder


Joined: 18 Mar 2005
Posts: 71
Rob-Well... I'm not too concerned about security, its only for show for the class and if I ever host it live I wont have a login or anything but that is a very useful tip. I will have to keep that in mind for future. Lots more studying to do lol.

GillBates-I'm just doing a very wasteful Computer Systems Technician course at the local college. I realised too late its a big waste of money for what I'm getting out of it and will have to head to Waterloo or U of T when I find financing.

Reply with quote
 
Krabik
Enthusiastic Coder


Joined: 15 Mar 2005
Posts: 62
u dont need money to learn this stuff.

i think most of the users of this website, and in fact most of really good web-dudes out there are self-taught.

just stick around and you'll pick it up...

Reply with quote
 
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Programming Forums -> JavaScript forum


Dubai Forums - Expat Help | Vegan Forum | Java Programming | 3d Design Resources | 3d Forum | 3D Jobs | 3D Textures | Paris Forum | Europe Forum
Dubai Classifieds | Dubai Property | Jobs in Dubai | Free London Classifieds | Jobs in London UK

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

© 2018 RedHo