Multiple Log In Question

Discussion in 'PHP' started by The_Phantom, Oct 2, 2006.

  1. #1
    With having several scripts that require registration, Log In & so forth, and all using their own database, How can I put everything into one database or check mutiple databases at one time, so that a user doesn't have to Log In 25 different times and only needs to Log In one time and can browse the entire site ?
     
    The_Phantom, Oct 2, 2006 IP
  2. digdogger

    digdogger Well-Known Member

    Messages:
    97
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    121
    #2
    One easy way (but not as secure) is to have a hidden frame on the post login / registration of the one application that links to the others..

    For example, on the login success page of the one app, you'd have
    
    <iframe src=/other-appliction/login.php?username=$username&password=$password wdith=1 height=1></iframe>
    
    HTML:
    They could set cookies and things and log them in. You wouldn't have to worry about a lot of codeing or libraries. This could even be done accross different servers and domains.

    Usually though, I'd try to integrate the apps so that there is only one login.
     
    digdogger, Oct 2, 2006 IP
  3. penagate

    penagate Guest

    Messages:
    277
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #3
    That's bad design, not to mention invalid HTML.

    Make one server-side script that includes the master files of all your applications and manually authenticate the user against each of them using the posted credentials.
     
    penagate, Oct 2, 2006 IP
  4. The_Phantom

    The_Phantom Well-Known Member

    Messages:
    470
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #4
    I'm not sure I understand what you're saying penagate. Can you please clarify ? Also, wouldn't sessions be involved somewhere as well ? I know that some scripts don't provide sessions, as others do..... so wouldn't that create problems ?

    Sorry, but I'm just trying to learn and grasp everything.
     
    The_Phantom, Oct 2, 2006 IP
  5. The_Phantom

    The_Phantom Well-Known Member

    Messages:
    470
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #5
    NObody has an answer ? hmmmm
     
    The_Phantom, Oct 4, 2006 IP
  6. rb3m

    rb3m Peon

    Messages:
    192
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hmmm... modifying the sign-in scripts to check of a session variable could work, or sending those session variables to the script via post (there's a thread on how to do that somewhere around here).

    Ultimately I guess it would depend on each script and see what works best with them.
     
    rb3m, Oct 4, 2006 IP