Results 1 to 6 of 6

Thread: login script

  1. #1
    Join Date
    Nov 2007
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb login script

    Hi!
    I am looking for a good php login script.
    I was wondering if anyone could recommend one that's not to complicated.

    I am trying to get a script where you can't view the website unless you are logged in. (no bypassing)

    If anyone can help, it would be greatly appreciated!

    bjf98

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    How do you plan to manage usernames/pwords? Database?

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

    Default

    Will there be on password, or multiple accounts, and can you use databases?
    (Medyman already asked part of that, though.)
    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

  4. #4
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default

    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@§†ê® §©®¡þ† /\/\@|{ê®
    There are 10 kinds of people in the world, those that understand binary and those that don't.

  5. #5
    Join Date
    Nov 2007
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry for taking so long to reply.
    Yes, I have access to a database
    Either way will be fine. I could have one password, or multiple accounts. It doesn't matter to me.

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

    Default

    If you just have one password, I suggest a simple script using PHP:
    1. Use sessions.
    2. Check if $_SESSION['loggedin'] is set. If not:
    3. Display the login forum and hide everything else.
    4. That will submit the password;
    5. The password will match the stored value in the PHP (which will be secure).
    6. Store loggedin=1 in the session.
    7. Now, it checks and verifies:
    8. Display the content, don't display login form.
    9. Add a log out option which destroys the session or unsets the loggedin value.

    If you do require/prefer multiple multiple users, you would be best using MySQL and doing the same idea overall, but you'll need to deal with username as well, then, and compare to a database.

    You can try this script for something more complex and ready to go: http://twey.co.uk?q=loginscript
    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

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
  •