Thread: .htaccess login

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    Durham, UK
    Posts
    20
    Rep Power
    0

    .htaccess login


    Hello i am trying to use this script for .htaccess login but after i added a image button it does not seem to login can you help please. you can login with

    test : 12345

    <!-- Beginfunction Login(form) {
    var username = form.username.value;
    var password = form.password.value;
    var server = form.server.value;
    if (username && password && server) {
    var htsite = "http://" + username + ":" + password + "@" + server;
    window.location = htsite;
    }
    else {
    alert("Please enter your username and password.");
    }
    }
    // End -->
    </script>
    </HEAD>
    <BODY>
    <form name=login><p align="left"><input type="hidden" name="server" value="impulsetech.co.uk/admin/"><font face="Arial" size="2"><input type=text name=username size=11 style="background-color: #FFFFFF; color: #BCBCE6; border: 1 solid #BCBCE6"><br>
    <input type=password name=password size=11 style="background-color: #FFFFFF; color: #BCBCE6; border: 1 solid #BCBCE6"><input type="image" src="impulsetech.co.uk/images/go_button.gif" value="Login!" onClick="Login(this.form)" name="button" width="24" height="24"></font>
    </form>

    Thanks Tim
  2. #2
  3. T-Shirt Tragic
    Devshed Novice (500 - 999 posts)

    Join Date
    Mar 2001
    Location
    Melbourne, Australia
    Posts
    886
    Rep Power
    321
    rewrite your form tag like this :-

    <form name="login" onsubmit="return false">

    hope this works for you.

IMN logo majestic logo threadwatch logo seochat tools logo