How do websites like facebook and formspring dynamically make links for their new users?

for example, if i sign up on formspring and my username is USA1992, the link to my profile is formspring.me/USA1992

how do websites do that?

by url rewriting (help of .htaccess file).
read articles on this topic.

They have one profile page, that serves as kind of a template for userhomes...
In the link to that page, they add a parameter, which servers as an unique id(username, primary key of a mysql table,...)So in the template page, they just fetch all the info from the database that corresponds to that key that is sent along.
Hope this clears things out a bit.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.