I have a site (or I'm doing it) where I can see the profile of the user that I select from index.html .
This page where the user's data is loaded is called user.php and the page where I see the profile of the current user (logged in) is called profile.php .
That idea was given to me long ago that there must be two pages, the ones mentioned above.
Well, I was watching the operation of this site, the twitter, facebook, etc and I realized that the only thing that changes is the id or username when I move from one to another.
I'll explain:
When you visit your profile on facebook in the url you have:
https://www.facebook.com/profile.php?id=100010542947857(este es el mio),
By the simple fact of changing a number of that, it takes me to another profile, but it's still the same page, that is, profile.php . And what is it that changes? the design changes, the only thing that changes are the buttons, in the profile of the logged-in user they leave you, update information, see the activity log, and if you go to another profile you will get the message buttons, send request, etc.
for example:
http://es.stackoverflow.com/users/12878/luis
ese es la dirección de mi perfil.
but if there is a user named jose2000 and I want to go to his profile I just have to delete "luis" (from the end of the address above) and put "jose2000".
So my question is, can not do that with a single page, for example "profile.php" and when I enter the profile of the logged in user not only uploads their data but also the configuration buttons, modify profile , etc.
I do not know if they understand.