I have a url problem.
When the user types in this url: “www.example.com/username”, it uses htaccess rewrite and goes to that username’s profile. The problem comes when there is a directory by the same name as the username. This creates an error and to get around it, I am going to capture the word from the url and go through the user database searching for the name grabbed from the url. If it is found under the members name column, it goes forward for the user profile and if it is not, it goes to the directory. How would I run through the mysql table just to see if the mysql table has the name?
I appreciate your help, thanks!
You’d rather check at registration stage whether a folder with such name exists,
but the check you are looking for would be 100% the same as the check you use to find whether the username is already taken at the registration page.
select count(*) from users where username = $user