Tutorial on how to make a login system in PHP and MYSQL with Sessions

Discussion in 'PHP' started by DPTony, Nov 13, 2005.

  1. #1
    DPTony, Nov 13, 2005 IP
  2. hnn

    hnn Peon

    Messages:
    91
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    That is very basic thing to do....
     
    hnn, Nov 13, 2005 IP
  3. bamb0lin

    bamb0lin Well-Known Member

    Messages:
    401
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #3
    Good tutorial.. keep it up :)
     
    bamb0lin, Nov 13, 2005 IP
  4. DPTony

    DPTony Peon

    Messages:
    329
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Please dont spam my thread please thanks. You don't see me spamming yours
     
    DPTony, Nov 13, 2005 IP
  5. TiGG

    TiGG Peon

    Messages:
    209
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Yes it maybe simple but good tutorial.
     
    TiGG, Nov 13, 2005 IP
  6. GeorgeB.

    GeorgeB. Notable Member

    Messages:
    5,695
    Likes Received:
    288
    Best Answers:
    0
    Trophy Points:
    280
    #6
    You're both spamming links that belong to you so what does it matter?

    Sheesh... kids.
     
    GeorgeB., Nov 13, 2005 IP
  7. DPTony

    DPTony Peon

    Messages:
    329
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Its my thread I'm posting a tutorial I just made I'm not spamming. Hes spamming.
     
    DPTony, Nov 13, 2005 IP
  8. bamb0lin

    bamb0lin Well-Known Member

    Messages:
    401
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #8
    It was not my intension
     
    bamb0lin, Nov 13, 2005 IP
  9. dataman

    dataman Peon

    Messages:
    94
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #9
    It's not really a good login system because you assume that things will be done for you. You also mix old session logic with new session logic...

    this... (old way)

    $myuserid = $row['ID'];
    session_register('myuserid');
    PHP:
    is not same as this... (new way)

    $_SESSION['myuserid'] = $row['ID'];
    PHP:

    As a standard rule mixing them is bad because they don't do the same thing, if register_globals is OFF your code will fail, because * myuserid * will never be registered! Your assuming something which is bad logic! My second example will work with register_globals is ON or OFF, and has been the new standard of assigning a session for a few years now!

    Now I am not try to discredit you, all I am saying is that giving advise on a subject matter that you seem to have limited knowledge about can be dangerous for others that have less knowledge than you have. There is also other logic problems to.

    Sorry if you think I am being rude, but that was not my intention, all I am saying is that writing a technical article is not like writing a key word article about some subject that may interest you. A technical article must in it's self use sound logic, which in this case means, the author should know what they are doing and use good coding standards and if you do something that is considered sub-standard than explain why you did it!

    jb
     
    dataman, Nov 14, 2005 IP
  10. DPTony

    DPTony Peon

    Messages:
    329
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I used this coding for many sites and sites have used this coding for this sites not one complaint yet.
     
    DPTony, Nov 14, 2005 IP
  11. DPTony

    DPTony Peon

    Messages:
    329
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Oh yes I must but apache by default has register_globals on so it works perfectly fine. :)
     
    DPTony, Nov 14, 2005 IP