Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

PHP Login

  • 15-09-2008 12:06PM
    #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,173 ✭✭✭✭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