title: Title doesn't change while using php and mysql
body: <p>I have a problem which changing Webpage title dynamically using PHP and MySQL.</p>
  
  <p>This code worked for me for about 5 mins and now it doesn't. </p>
  
  <p>When I view the source code, it actually fetches the data but doesn't update the title in the web page.    </p>
  
  <p>Can you please suggest?</p>
  
  <pre><code>&lt;?php 
      mysql_connect("localhost","admin","admin") or die(mysql_error()); 
      mysql_select_db("Table") or die(mysql_error()); 
  
      $id=$_GET["id"];
      if(!is_numeric($id)){
      echo "Data Error";
      exit;
  }
  
  $data=mysql_query("SELECT * FROM `test` WHERE `Job_ID`=$id");
  $row=mysql_fetch_object($data);
  echo mysql_error();
  
  echo "&lt;tr&gt;&lt;th&gt;Job Title:&lt;/th&gt;&lt;/tr&gt;";
  echo"&lt;tr&gt;&lt;td&gt;$row-&gt;Job_Title&lt;/td&gt;&lt;/tr&gt;";
  echo "&lt;tr&gt;&lt;th&gt;Website:&lt;/th&gt;&lt;/tr&gt;";
  echo"&lt;tr&gt;&lt;td&gt;$row-&gt;Company_URL&lt;/td&gt;&lt;/tr&gt;";
  
  $pagetitle = $row-&gt;Job_Title; 
  echo "&lt;title&gt; Required $pagetitle &lt;/title&gt;";
  </code></pre>