I am trying to figure out the best way/how to go about this -
I am relatively new to mysql and PHP and need to create user profile pages that display different values from a mysql database that have been uploaded for each user -
for example if I clicked on John's profile, the page would display John's name, age, any other values that I have stored on John in my mysql table. This is from the perspective of someone else logged in who wants to view John's page.
Since all my index.php files for my different web pages are all in their own folders (i.e. the about page, settings page, etc) I originally thought to simply have a user profile folder and index.php that just outputs the right information in accordance with the $user_id of the user that was clicked. That is the only way I can think to accomplish this.
My problem is that this would not allow for a person to access a user profile via URL (i.e. website.com/user1) and I am not sure my approach is the best/correct way to create user profile pages. I have explored this question and read up on URL rewriting but am still unclear -
What is the correct way to create separate user profile web pages and how does URL rewriting tie into the actual contents of the page's index file?
Is there a way to (this is poorly worded) store a separate index.php file for each user within their existing mysql column and just direct to this file when clicked?
index.phpto all user profiles, php frameworks like laravel would be helpful.