SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Thread: help

  1. #1
    SitePoint Enthusiast Klown's Avatar
    Join Date
    May 2001
    Location
    Michigan
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    login scripts

    ok I'm working on a login script but I don't want more than one person to be logged in as the same user.
    How would I go about making sure that multiable people don't login under the same name at the same time?

    Sorry for repeating myself.
    Last edited by Klown; Sep 6, 2001 at 15:56.
    Klown
    Email me | AIM: missingklown | MSN: general_klown@hotmail.com |
    Yahoo: missingklown | ICQ: 147644177
    Klown-Works- Redesign in progress.

  2. #2
    will code HTML for food Michel V's Avatar
    Join Date
    Sep 2000
    Location
    Corsica
    Posts
    552
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can have a field in your database that'd be set to 1 if the user is logged on and 0 when s/he's logged off.
    So when an user logs on you check if the field is set to 1 or 0, and act accordingly.
    You may want to add a timeout thing so the user is automatically logged off after a certain time of inactivity.
    [blogger: zengun] [blogware contributor: wordpress]

  3. #3
    SitePoint Enthusiast Klown's Avatar
    Join Date
    May 2001
    Location
    Michigan
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how would I go about do that? I understand the concept but I can't think of how the coding would go. Also how hard would it be to log ip address when a person logs in?
    Forgive me I'm new at using php
    Klown
    Email me | AIM: missingklown | MSN: general_klown@hotmail.com |
    Yahoo: missingklown | ICQ: 147644177
    Klown-Works- Redesign in progress.

  4. #4
    SitePoint Enthusiast Klown's Avatar
    Join Date
    May 2001
    Location
    Michigan
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Shin Ma
    You can have a field in your database that'd be set to 1 if the user is logged on and 0 when s/he's logged off.
    So when an user logs on you check if the field is set to 1 or 0, and act accordingly.
    You may want to add a timeout thing so the user is automatically logged off after a certain time of inactivity.
    Could any one explain how to do this?
    Klown
    Email me | AIM: missingklown | MSN: general_klown@hotmail.com |
    Yahoo: missingklown | ICQ: 147644177
    Klown-Works- Redesign in progress.

  5. #5
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    why don't you just not allow duplicate memberships?
    so if you don't have to users with the same login info, you won't have duplicate logins
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*

  6. #6
    SitePoint Enthusiast Klown's Avatar
    Join Date
    May 2001
    Location
    Michigan
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the site i'm making this for the members share the login info and so soon everyone is using one name.
    Klown
    Email me | AIM: missingklown | MSN: general_klown@hotmail.com |
    Yahoo: missingklown | ICQ: 147644177
    Klown-Works- Redesign in progress.

  7. #7
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check this out...it's on PHP sessions:
    http://www.php.net/manual/fr/ref.session.php

  8. #8
    SitePoint Enthusiast Klown's Avatar
    Join Date
    May 2001
    Location
    Michigan
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks
    Klown
    Email me | AIM: missingklown | MSN: general_klown@hotmail.com |
    Yahoo: missingklown | ICQ: 147644177
    Klown-Works- Redesign in progress.


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
  •