Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: html password

  1. #1
    Join Date
    Oct 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default html password

    hi there... some time ago i use an easy script from here but i lose it... its simple a form ask for a usename & password and goes a bubch of "if ' s" commmand in the fom like this
    if username==this and. password== that go thispage.htm
    if username==this and. password== that go thatpage.htm
    if username==this and. password== that go anotherpage.htm
    if username==this and. password== that go morepages.htm

    i know the code its so simple but i just forget how the code was... can somebody give a help here... pls??

    tnx in advance
    Jorge

  2. #2
    Join Date
    Jul 2005
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Do you want to use cgi, PHP, or what? HTML cant do this without help I'm pretty sure.

  3. #3
    Join Date
    Oct 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    well yes but i look some easy way the web site im planing its simple..

  4. #4
    Join Date
    Oct 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    i found it!!!... well if someone interest in some easy and low level of security here is... remembre combine this script with the "no right click button" to prevent no ine can see the script...


    <!-- TWO STEPS TO INSTALL MULTIPLE USERS:

    1. Copy the first code into the HEAD of your HTML document
    2. Put the last coding into the BODY of your HTML document -->

    <!-- STEP ONE: Copy this code into the HEAD of your login HTML document -->

    <HEAD>

    <SCRIPT LANGUAGE="JavaScript">

    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->

    <!-- Begin
    function Login(){
    var done=0;
    var username=document.login.username.value;
    username=username.toLowerCase();
    var password=document.login.password.value;
    password=password.toLowerCase();
    if (username=="member1" && password=="password1") { window.location="page1.html"; done=1; }
    if (username=="member2" && password=="password2") { window.location="page2.html"; done=1; }
    if (username=="member3" && password=="password3") { window.location="page3.html"; done=1; }
    if (done==0) { alert("Invalid login!"); }
    }
    // End -->
    </SCRIPT>

    <!-- STEP TWO: Paste this code into the BODY of your HTML document -->

    <BODY>

    <center>
    <form name=login>
    <table width=225 border=1 cellpadding=3>
    <tr><td colspan=2><center><font size="+2"><b>Members-Only Area!</b></font></center></td></tr>
    <tr><td>Username:</td><td><input type=text name=username></td></tr>
    <tr><td>Password:</td><td><input type=text name=password></td></tr>
    <tr><td colspan=2 align=center><input type=button value="Login!" onClick="Login()"></td></tr>
    </table>
    </form>
    </center>

    <p><center>
    <font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
    by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
    </center><p>

    <!-- Script Size: 1.60 KB -->

  5. #5
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Just use .htaccess... so much easier, more secure and faster...
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  6. #6
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Or PHP
    - Mike

  7. #7
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    And, the no right click button is really funny.
    View>Source.
    That's it. I rarely right click anyway. Heh.

    Not secure, for people who want to get around it.... and the other people won't be trying to, so why use any security if you don't care if it's not secure?
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  8. #8
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    Quote Originally Posted by djr33
    And, the no right click button is really funny.
    View>Source.
    That's it. I rarely right click anyway. Heh.

    Not secure, for people who want to get around it.... and the other people won't be trying to, so why use any security if you don't care if it's not secure?
    Easier than that. Tools->Quick Preferences->Uncheck Enable JavaScript(in OPera 9)

  9. #9
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    That, plus right clicking and clicking view source is easier than:
    view>source?????
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  10. #10
    Join Date
    Dec 2004
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Some server can not use .htaccess

Bookmarks

Posting Permissions

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