Jimmy Sawczuck pointed an answer, but to explain it here:
What you want to achieve in you case is to access a profile page using the username in the url.
Creating php file for each user is troublesome and can lead to bugs (maintanability is awfull too)
You can create a profile.php script that use an argument called username
. So your link will be
mysite.com/profile.php?username=bob
However it is not the url you want. And to save you exists the Rewrite Mod of webservers (mod_rewrite for apache, search for corresponding utility for other webservers)
This mod allow you to rewrite your url to match what you want:
Eg: website.com/bob in webbrowser is rewrited website.com/profile.php?username=bob for your server.
Which mean you users can have the pretty/tiny url, but the webserver will change it to call the wanted script. So both are happy.
To do this rewriting you use a module with rewriting rules. If you use apache, you use mod_rewrite and put the rule in your website configuration file or .htaccess in the wanted directory.
For the rule check the link given by Jimmy Sawczuck
Regards