SQL login check help

This topic contains 4 replies, has 1 voice, and was last updated by  Amit 2 years, 1 month ago.

  • Author
    Posts
  • #11133

    Nina
    Member

    I have a website that has a simple login page, I use this to check the login

    I would like it to be able to have more than 1 uid that it accepts. How can I add some kind of “uid=8 OR 9” so that it works? I have not been able to find a working way.

    Thanks if you can help.

    actually I just tried this and it seems to work

    So I guess that’s all, or does anyone have any comments on this?

    Another issue I have been thinking about. How can I make it load a different page depending on which user logs in?

    At the end I have now this

    How could I do some kind of :

    ??

  • #11134

    Adelaid
    Member

    Judging by what you said and the code you can literally just do

    If you wanted to do it based on usergroup or something then you’d need to execute a separate query, check then redirect accordingly.

  • #11135

    Abhey
    Member

    why you need to match the UID? If it is because you only want a certain UID to have access to an admin control panel then I understand but if you are wanting to check the username then you can do what Barto suggested.

    So you could have your SQL check that the username and password info is correct and if it is correct check whether it is a certain username.

  • #11136

    SapnaVishwas
    Member

    check for UID is I noticed if I had it just look if the username and passwords matched, it accepted any username and password from the userlist, so a user I had made for another page could also login here, I wanted to prevent different usernames to login to the “secret” pages. When it checks the UID, then I make sure only the specific user can log in.

    Probably there would also be another way, this is just what worked for me first.

  • #11137

    Amit
    Member

    Instead of using UID’s for that, why not create usergroups which have certain permissions?

You must be logged in to reply to this topic.