dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: To More Anti-Ignorant People... HELP!

  1. #1
    Join Date
    Feb 2010
    Location
    Northern Massachusetts Swampland
    Posts
    7

    Unhappy To More Anti-Ignorant People... HELP!

    Hi. I have this script, where I want it to use a multi-user login. the code is below.

    var username=window.prompt('Enter your Username');
    var password=window.prompt('Enter your Password');

    if (username="Nick" && password="a"){var login="1";} Else {var login="0";}
    if (username="Bob" && password="b"){var login="2";} Else {var login="0";}
    if (username="Joe" && password="c"){var login="3";} Else {var login="0";}

    switch (login){
    case "1":
    window.alert('Welcome, Nick');
    window.location('http://www.google.com/');
    case "2":
    window.alert('Welcome, Bob');
    window.location('http://www.google.com/');
    case "3":
    window.alert('Welcome, Joe');
    window.location('http://www.google.com/');
    case "4":
    window.alert('Who are you?!? Begone with you!');
    window.location('http://www.google.com/');
    }


    I have 2 problems. One is that mainly, it doesn't work! If someone could help me out, I'd appreciate it. And Two, is there someway you can block an external script from being viewed in a browser, or someway to keep people from reading the Usernames and Passwords? Thanks.

  2. #2
    Join Date
    Jul 2003
    Location
    The City of Roses
    Posts
    2,503
    Here is a demonstration showing how it can be done.
    http://www.webdeveloper.com/forum/sh...41&postcount=1

    But you'll need to expand on the principle to make it a multi-user system.
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles