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

Thread: Login Box

  1. #1
    Join Date
    Oct 2005
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Login Box

    How would I go about taking the quick login box found in forums and add it to my website home page? Keep in mind I know near nothing about SQL, infact I only posted in this area because I figured I'd have to extract the info from my forum's MySQL Database.

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

    Default

    If you want this, and you don't know SQL, then I would suggest learning.

    Generally.... php gets the values sent by the form. Easy.

    PHP calls the database and checks if the where the user= username sent through form, the password matches the sent password.
    If so, correct login.

    Also, you'd need a register function, but it goes on the same ideas.


    Using md5() (a php function) on the password before being stored (and then before comparing to the stored value) creates a secure encoded string that will match if the same string is encoded with md5, but can't be reversed. It's a bit complex to understand at first, but this is big for security, and privacy.
    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

  3. #3
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    If you are looking for a user management system in your site then you can implement that using two different things:

    1. Using Files

    2. Using Databases

    1.This is the earlier method before databases comes into practice. You'll get some applications still using file system for their data storage. But this has its own problems so developers started using databases.

    2. Databases provides consistent data storage that can be accessible for the users concurrently. If you want to manipulate the database there is a universal language called SQL - Structured Query Language using which you can communicate with your database.

    To implement the user management part you need a server side language. Now all the popular server side technology supports database intereaction.

    As djr33 mentioned in his post it is better if you start learning these things so that you can incorporate the system in your site without any delay.

  4. #4
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Quote Originally Posted by djr33
    Using md5() (a php function) on the password before being stored (and then before comparing to the stored value)
    Then how can we recover passwords?
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  5. #5
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    Password recovery doesn't required na if somebody complains about losing a password generate a new one, calculate the password hash, store that in the daabase & send the password to the user using email. Thats it

  6. #6
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    I lost my password once and they sent me an e-mail telling me my password, not a new one. Strange...
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  7. #7
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    That is possible if you store your password as such or using some customized hash mechanisms through which you can regenerate the original password itself.

    But that method has a greater problem as if anybody got control over the database either they can view the password directly or they can reverse the customized encrypt function used by the site earlier to keep the password. The cracker can employ a decrypter or a password cracker to get the correct password.

    I hope now things are clear

  8. #8
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    That's true.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  9. #9
    Join Date
    Oct 2005
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the info but I already know how to use php to do this, what I want to do is take the login box directly from my forum and use the exact same box on my website. So people can directly login to my forum from my website home page, not my forum index.
    Thanks anyways, it's always cool to learn more about password encryption, I was told md5 is becoming outdated though.

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

    Default

    Check the code of the forum and copy the form box. It should have something like this:

    Code:
    <form action="the login page" method="post">
    <input name="user (might be something else)">
    <br><input name="pass (might be something else)">
    <br><input type="submit" value="Submit Value">
    </form>
    - Mike

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
  •