For learning purposes, I am building a simple web app that allows users to write an introduction page for themselves. I am very confused about dynamically generated HTML on the server-side and how it connects to the client-side. I am currently using PHP and Mustache templates to generate the about page HTML on the server side and that works fine.
Lets say I type in the URL: localhost/intro.html
On intro.html there is a button and if I click it then the browser would bring me to a new URL (localhost/intro.html/Adam) with the introduction information of a user, lets just say "Adam".
From my understanding, this should send a request to the server to generate an about HTML page with information about Adam and send that HTML page back to the browser.
What I don't understand is what it would look like in HTML, JS (JQuery), and PHP. Again, I can generate the HTML on the server side just fine, but how would clicking a button on localhost/intro.html change the page to localhost/intro.html/Adam ? How would my PHP code detect the page localhost/intro.html/Adam and know to generate HTML for it? What does the code look like and am I missing some concepts?
Any direction, sample code or tutorials would be much appreciated. All I can find is strictly PHP tutorials. Thank you!