www.webdeveloper.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 22

Thread: HELP! How Do I create a login form?What is the html code for it?

Hybrid View

  1. #1
    Join Date
    Dec 2002
    Posts
    1

    HELP! How Do I create a login form?What is the html code for it?

    please! help me! i really want to know how!oh, and please put instructions how to use it, thnx!
    Share on Google+

  2. #2
    Join Date
    Nov 2002
    Posts
    631
    Hold on. I just made one. What a coincidence. It should be uploaded to my site tonight. I will name it http://www.geocities.com/lordoftheri...ien/login.html
    Hope it's what your looking for!
    Share on Google+

  3. #3
    Join Date
    Nov 2002
    Location
    NY, USA
    Posts
    731
    See http://www.w3.org/TR/html401/interact/forms.html for details on how to create forms.
    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";
    Share on Google+

  4. #4
    Join Date
    Nov 2002
    Posts
    631
    He wants a login form. Not a form.
    Share on Google+

  5. #5
    Join Date
    Nov 2002
    Posts
    631
    Here's the script for the login form. I have the JavaScript in an external file.

    HTML code (login.html):

    <html>
    <head>
    <title>Please type your Username and Password... </title>
    <script language="JavaScript" type="text/JavaScript" src="login.js"></script>
    </head>
    <body bgcolor="#eeeeee">
    <form>
    <br>
    <center>
    Username: <input type="text" name="username" style="background:#bfbfbf;color:#212121;border-color:#212121;" onFocus="this.style.background = '#ffffff';" onBlur="this.style.background = '#bfbfbf';">
    <br>
    Password: <input type="password" name="password" style="background:#bfbfbf;color:#212121;border-color:#212121;" onFocus="this.style.background = '#ffffff';" onBlur="this.style.background = '#bfbfbf';">
    <br>
    <input type="button" value="Login" onClick="Login(this.form);" style="background:#bfbfbf;color:#000000;border-color:#212121;" onMouseOver="this.style.color = '#404040';" onMouseOut="this.style.color = '#000000';" onFocusr="this.style.color = '#404040';" onBlur="this.style.color = '#000000';">
    </center>
    </form>
    </body>
    </html>

    You can change the appearance.


    External JavaScript code (login.js):

    <!-- Begin

    function Login(form) {
    username = new Array("u1","u2","u3","u4","u5","u6","u7","u8","u9","u10");
    password = new Array("p1","p2","p3","p4","p5","p6","p7","p8","p9","p10");
    page = "secretpage" + ".html";
    if (form.username.value == username[0] && form.password.value == password[0] || form.username.value == username[1] && form.password.value == password[1] || form.username.value == username[2] && form.password.value == password[2] || form.username.value == username[3] && form.password.value == password[3] || form.username.value == username[4] && form.password.value == password[4] || form.username.value == username[5] && form.password.value == password[5] || form.username.value == username[6] && form.password.value == password[6] || form.username.value == username[7] && form.password.value == password[7] || form.username.value == username[8] && form.password.value == password[8] || form.username.value == username[9] && form.password.value == password[9]) {
    self.location.href = page;
    }
    else {
    alert("Either the username or password you entered is incorrect.\nPlease try again.");
    form.username.focus();
    }
    return true;
    }

    // End -->

    You can change the page = "secretpage" + ".html"; to whatever you want. The passwords are stored in arrays, I have just made the passwords u1, p1 for username1 and password1, but you can make them whatever you want.
    Share on Google+

  6. #6
    Join Date
    Feb 2007
    Posts
    4

    Talking

    umm.. w3n i tried it out for muhself n cliked log in nutin happend buh w3n i
    cliked ur thang n i clikd log in it sed da usaname or pass was wrong n how is da thang supposed ta kno? plz tell m3 or email my bak at r4nm4_saotome@yahoo.com... plz tell may aall give ya a kisss cuz aam da hottest chick round da place
    Quote Originally Posted by Zach Elfers
    Here's the script for the login form. I have the JavaScript in an external file.

    HTML code (login.html):

    <html>
    <head>
    <title>Please type your Username and Password... </title>
    <script language="JavaScript" type="text/JavaScript" src="login.js"></script>
    </head>
    <body bgcolor="#eeeeee">
    <form>
    <br>
    <center>
    Username: <input type="text" name="username" style="background:#bfbfbf;color:#212121;border-color:#212121;" onFocus="this.style.background = '#ffffff';" onBlur="this.style.background = '#bfbfbf';">
    <br>
    Password: <input type="password" name="password" style="background:#bfbfbf;color:#212121;border-color:#212121;" onFocus="this.style.background = '#ffffff';" onBlur="this.style.background = '#bfbfbf';">
    <br>
    <input type="button" value="Login" onClick="Login(this.form);" style="background:#bfbfbf;color:#000000;border-color:#212121;" onMouseOver="this.style.color = '#404040';" onMouseOut="this.style.color = '#000000';" onFocusr="this.style.color = '#404040';" onBlur="this.style.color = '#000000';">
    </center>
    </form>
    </body>
    </html>

    You can change the appearance.


    External JavaScript code (login.js):

    <!-- Begin

    function Login(form) {
    username = new Array("u1","u2","u3","u4","u5","u6","u7","u8","u9","u10");
    password = new Array("p1","p2","p3","p4","p5","p6","p7","p8","p9","p10");
    page = "secretpage" + ".html";
    if (form.username.value == username[0] && form.password.value == password[0] || form.username.value == username[1] && form.password.value == password[1] || form.username.value == username[2] && form.password.value == password[2] || form.username.value == username[3] && form.password.value == password[3] || form.username.value == username[4] && form.password.value == password[4] || form.username.value == username[5] && form.password.value == password[5] || form.username.value == username[6] && form.password.value == password[6] || form.username.value == username[7] && form.password.value == password[7] || form.username.value == username[8] && form.password.value == password[8] || form.username.value == username[9] && form.password.value == password[9]) {
    self.location.href = page;
    }
    else {
    alert("Either the username or password you entered is incorrect.\nPlease try again.");
    form.username.focus();
    }
    return true;
    }

    // End -->

    You can change the page = "secretpage" + ".html"; to whatever you want. The passwords are stored in arrays, I have just made the passwords u1, p1 for username1 and password1, but you can make them whatever you want.
    Share on Google+

  7. #7
    Join Date
    Mar 2007
    Location
    England, Weymouth
    Posts
    7

    Can you......

    just wondering if you could make this login script go to multiple destinations?

    the code is...

    HTML Code:
    <!-- Begin
    
    function Login(form) {
    username = new Array("u1","u2","u3","u4","u5","u6","u7","u8","u9","u10");
    password = new Array("p1","p2","p3","p4","p5","p6","p7","p8","p9","p10");
    page = "http://www.google" + ".com";
    if (form.username.value == username[0] && form.password.value == password[0] || form.username.value == username[1] && form.password.value == password[1] || form.username.value == username[2] && form.password.value == password[2] || form.username.value == username[3] && form.password.value == password[3] || form.username.value == username[4] && form.password.value == password[4] || form.username.value == username[5] && form.password.value == password[5] || form.username.value == username[6] && form.password.value == password[6] || form.username.value == username[7] && form.password.value == password[7] || form.username.value == username[8] && form.password.value == password[8] || form.username.value == username[9] && form.password.value == password[9]) {
    self.location.href = page;
    }
    else {
    alert("Either the username or password you entered is incorrect.\nPlease try again.");
    form.username.focus();
    }
    return true;
    }
    
    // End -->
    Share on Google+

  8. #8
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,220

    Talking

    Quote Originally Posted by kagome
    umm.. w3n i tried it out for muhself n cliked log in nutin happend buh w3n i
    cliked ur thang n i clikd log in it sed da usaname or pass was wrong n how is da thang supposed ta kno? plz tell m3 or email my bak at r4nm4_saotome@yahoo.com... plz tell may aall give ya a kisss cuz aam da hottest chick round da place
    Aside from not being able to read what you said , I hope you like spam, because you entered your email address for all bots and quirky people.

    Cheers...

    Ron
    Share on Google+

  9. #9
    Join Date
    Sep 2009
    Posts
    1

    Help

    Where do i put the username and password. If the username is abcd and password is 1234
    Share on Google+

  10. #10
    Join Date
    Nov 2002
    Location
    NY, USA
    Posts
    731
    I see, so you think that information on creating and submitting forms is irrelevant to creating a login form?

    There are two main parts to a working user login. The HTML form and the server-side program (unless you use insecure client-side scripting). Thier question was posted in the HTML forum hence they received the HTML answer. The official docs would be a far better place to learn than someone's personal page. As far as the server-side programming, they won't be able to view this from your site anyway, unless you provide a text document of the source.
    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";
    Share on Google+

  11. #11
    Join Date
    Nov 2002
    Posts
    631
    sorry. I'm stupid.
    Share on Google+

  12. #12
    Join Date
    Nov 2002
    Location
    NY, USA
    Posts
    731
    I have the JavaScript in an external file

    AKA insecure client-side method. Anyone with moderate knowledge would be able to crack this in a matter of seconds.
    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";
    Share on Google+

  13. #13
    Join Date
    Nov 2002
    Posts
    631
    Yeah, I know. I made this just for fun, not for something secure. I don't have my own domain, so I am not able to use sercure server-side scripting. I put this in an external JS, just to keep amateurs out. Anybody else could get in.
    Share on Google+

  14. #14
    Join Date
    Feb 2010
    Posts
    1
    Quote Originally Posted by Zach Elfers View Post
    Yeah, I know. I made this just for fun, not for something secure. I don't have my own domain, so I am not able to use sercure server-side scripting. I put this in an external JS, just to keep amateurs out. Anybody else could get in.
    where do I place the external JS to make this work?
    Share on Google+

  15. #15
    Join Date
    Sep 2010
    Posts
    1

    Exclamation Help

    I got what you guys was talking about to work but how can i work that in to this,

    <div style="float: right; text-align: right; font-weight: bold; color: white;">
    <H3></H3> <Provisional users can't create forms action="operations0.php" onSubmit="rememberinput('pilot', )" style="margin: 0px; padding: 0px; margin-top: 70px; margin-right: 3px;" method="POST">
    <table align="left" cellpadding="0" cellspacing="3" style="background: url('/Images/background.png'); font-weight: bold; color: white;">
    <tr><td colspan="2" style="color: white; font-weight: bold;">Pilot Login:</td></tr>
    <tr><td style="color: white; font-weight: bold;">Pilot ID:</td><td class="top"><input type="text" name="pilot"></input></td></tr>
    <tr><td style="color: white; font-weight: bold;">Password:</td><td class="top"><input type="password" name="password"></input></td></tr>

    <tr><td style="color: white; font-weight: bold;">Division:</td><td class="top" align="right" colspan="2">
    <select name="airline">
    <option value="SIA">Passenger</option>
    <option value="SQC">Cargo</option>
    </select>
    </td></tr>

    <tr><td align="right" colspan="2"><input style="background: clear; border: none;" type="image" src="/images/login.png"></input></td></tr>
    </table>
    </form>
    </div>

    PLZ HElp
    Share on Google+

Thread Information

Users Browsing this Thread

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

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

"

"

X vBulletin 4.2.2 Debug Information

  • Page Generation 0.12600 seconds
  • Memory Usage 3,430KB
  • Queries Executed 13 (?)
More Information
Template Usage (34):
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)bbcode_html
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (15)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (15)postbit
  • (15)postbit_onlinestatus
  • (15)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (27):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./includes/functions_threadedmode.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (73):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • pagenav_page
  • pagenav_complete
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates