Good time of day.
There is a users table, when registering a user, there should be a check whether there is a line with the same email column as $ email ( $email == $row['email'] = занято, $email !== $row['email'] = свободно ).
I tried in different ways, but it did not work out. :(