title: How to check what is Written in the url bar and navigate to a certain page in php?
body: <p>What i want to be able to do is if someone writes in the url bar</p>
  
  <p>www.somesite.com/test</p>
  
  <p>test is like the Username name so it will be www.somesite.com/Username
  then page navigate to another and display data from the data where the username is the same</p>
  
  <p>The page will navigate to another page and display data from he database</p>
  
  <p>is this possible first of?</p>
  
  <p>And this is what i have write now it not much, and i am also new to PHP</p>
  
  <pre><code>$url = 'http://'. $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
  $url2 = "http://www.somesite.com/"$databaseVar1=mysql_result($result,$i,"username");
  
  if ($url) == ($url2)
  {
  header("location: http://somesite.com/viewcontent.php");
  }
  else
  {
  //not found
  }
  </code></pre>
  
  <p>Am i Able to do something like this? Any help will be great-full thanks </p>