Alex Alex - 17 days ago 4x
Ajax Question

How profiles are viewed through url?

Just like facebook when anything is entered at the end of url, is searched and viewed for instance. -> profile is viewed that has username alex

similarly -> username with abc, profile is viewed.

How does this work?


This is a multi-stage setup, and a very broad question you've asked.

Primarily it normally works by having a rewriting filter (using .htaccess or similar functionality), which redirects to something like profile.php?user=[username] page. In that page you fetch the username with $_GET['user'], and do a DB lookup based upon that.