Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

PHP Login

  • 15-09-2008 11:06am
    #1
    Registered Users, Registered Users 2 Posts: 211 ✭✭


    Hi all,

    I have a very simple PHP password login system but I cant figure out how to add another username and password. Below is the php statement used for my current username and password.

    [PHP]
    if ($_POST === '*******' && $_POST === '*******')
    [/PHP]

    I know MySQL is a far better way of doing this. But I will only be using max 3 different logins.

    Any help would be great,
    Thanks


Comments

  • Registered Users, Registered Users 2 Posts: 68,317 ✭✭✭✭seamus


    [PHP]
    if (
    ($_POST === 'user1' && $_POST === 'pass1')
    || ($_POST === 'user2' && $_POST === 'pass2')
    || ($_POST === 'user3' && $_POST === 'pass3')
    )
    [/PHP]
    It's a headache to read code like this, but if you have no other choice...


  • Registered Users, Registered Users 2 Posts: 2,534 ✭✭✭FruitLover


    I hope you're using SSL/TLS...


Advertisement