Checking PHP users by name and by id

1

I am creating a web application in which I need to be able to register a specific type of users in which the name can be repeated but the id they have assigned does not. The table in which they are stored has the following structure: user_id int auto_increment primary key name varchar (100) not null The problem is that when I register a user I want to consult in my database that there is no name with that id, but in turn it must allow several users to enter with the same name but different id. Finally, I do not know how to write the php code that verifies me, or if there is a simpler way to achieve this goal. Thank you very much for the inconvenience, a greeting to the community.

    
asked by pablito-clavo-un-clavito 31.03.2018 в 21:13
source

0 answers