title: How to change appearance of URL from within a PHP script
body: <p>I have some PHP and HTML in the same file, and I am not exactly sure how to make the URL appear as the name of that page.</p>
  
  <p>Here is an example of what I would like to do: lets say some page id = 1 and the title of that page is HelloWorld.</p>
  
  <p>Instead of <code>site.com/page.php?id=1</code> I would like the url to appear as <code>site.com/HelloWorld</code></p>
  
  <p>But the problem I am having is that I only get to know the title of the page inside that page after I query for the title by id. </p>
  
  <p>Considering the setup I described, is there a way to make the urls appear as the names of the pages? And also, if someone links to that page by using the better looking url with the name of the page instead of the id, is there still a way to get the id and by that, the rest of the page contents?</p>
  
  <p>Thanks!!</p>