Answer the question
In order to leave comments, you need to log in
How to check for a unique address?
When registering on the site, the user is automatically assigned a unique page address in the format site.ou/id***
Where *** is the line number from the database.
Those. when registering in the database, a new record of the format is created (first name, last name, phone number and, accordingly, an id is automatically created), the id number is taken from there.
The question is how to check the uniqueness of the address?
For example, a person wants to change id123 to durov
1 using the form.
2. How can I prevent a user from choosing an address in the id124 format (because the next registered user will receive this id and it is unacceptable that there would be a conflict of addresses - each must be unique)?
3. How to implement a function similar to that of vk, for example?
Answer the question
In order to leave comments, you need to log in
2. How can I prevent a user from choosing an address in the id124 format (because the next registered user will receive this id and it is unacceptable that there would be a conflict of addresses - each must be unique)?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question