title: Click a table row to display the data of that chosen row in a new php page
body: <p>At the moment, I can use a drop down list to retrieve data which is presented on a table. I want to make every row of a table clickable. Once I have clicked on that particular row, I want the data of that row (id, age, state, city, healthcare, team, cause, planned date, from and AAA_diam) to be displayed in a new php page. It should look like this and I hope that I'm being clear enough.</p>
  
  <p>Display of information in a new PHP page once I've clicked on a row of a table.</p>
  
  <pre><code>Id: $id (from the table row)
  age: $age
  city: $city
  healthcare: $healthcare
  team: $team
  cause: $cause
  planned date: $planned date
  from: $from
  AAA_diam: $AAA_diam
  
  
  &lt;html&gt;
      &lt;head&gt;
          &lt;script type="text/javascript" src="script.js"&gt;&lt;/script&gt;
  
      &lt;/head&gt;
      &lt;body&gt;
  
          &lt;form name="Select_filter3" method="POST" action="index.php"&gt;
  
      &lt;select id="dropdown3" name="filter3"&gt;
          &lt;option value=""&gt;&lt;/option&gt;
          &lt;option value="1"&gt;Amount of present&lt;/option&gt;
          &lt;option value="2"&gt;Amount of absent&lt;/option&gt;
          &lt;option value="3"&gt;Amount of present: destination&lt;/option&gt;
          &lt;option value="4"&gt;Antal of absent: destination&lt;/option&gt;
          &lt;option value="5"&gt;Amount A_diam &gt; 3cm&lt;/option&gt;
          &lt;option value="6"&gt;Amount A_diam &gt; 5cm&lt;/option&gt;
  &lt;/select&gt;
  
  
  
      &lt;input id="search_box2" type="text" name="search_box3" value="" /&gt;
      &lt;input id="submit2" type ="submit" name ="search3" value ="Ok"&gt;
  
      &lt;/body&gt;
  &lt;/html&gt;
  
  
  &lt;?php
  
  include "connection1.php";
  
  mysql_query ('SET NAMES UTF8;');
  mysql_query ('SET COLLATION_CONNECTION=utf8_general_ci;');
  mysql_client_encoding($connect);// where $conn is your connection
  
  
  
  
  
  if (isset($_POST['search3'])) {
  
      switch($_POST['filter3']) {
  
          Default: 
              $sql = " ";
              break;
  
          case 1:
              $sql = "SELECT  * FROM mytable WHERE age = '35' AND city != 'Los Angeles'  ";
  
  
  echo "&lt;table border='1'&gt;
  &lt;tr&gt;
  &lt;th&gt;ID&lt;/th&gt;
  &lt;th&gt;age&lt;/th&gt;
  &lt;th&gt;state&lt;/th&gt;
  &lt;th&gt;city&lt;/th&gt;
  &lt;th&gt;healthcare&lt;/th&gt;
  &lt;th&gt;Team&lt;/th&gt;
  &lt;th&gt;cause&lt;/th&gt;
  &lt;th&gt;Planned date&lt;/th&gt;
  &lt;th&gt;From&lt;/th&gt;
  &lt;th&gt;diameter&lt;/th&gt;
  &lt;/tr&gt;";
  
  $query = mysql_query($sql) or die(mysql_error());
  
  while($row = mysql_fetch_array($query)) {
  
    echo "&lt;tr&gt;";
    echo "&lt;td&gt;" . $row['id'] . "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row['age'] . "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row['state'] . "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row['city'] . "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row['healthcare'] . "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row['Team'] . "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row['cause'] . "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row[’planned date’] . "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row['from'] . "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row['AAA_diam'] . "&lt;/td&gt;";
    echo "&lt;/tr&gt;";
  }
  
  echo "&lt;/table&gt;";
              break;   
  
  mysql_close($connect);
  ?&gt;
  </code></pre>