title: how to make link for data field retrieve from mysql using php, html?
body: <p>I am displaying some fields from mysql database using php as given in screen shots. Actually each person has lots of data in several tables. The screen shot displaying only few collected from several tables. Now to display all information corresponding to a person it will be easy if the field usn (say 10IS037) is a link such that whenever i click on any usn then it redirects to another page where the whole information will be display using some query. Now i am trying but i can not make any link of us filed. please see the screen shot.
  <img src="https://i.stack.imgur.com/riCOs.jpg" alt="enter image description here"></p>
  
  <p>A portion of Code is here..</p>
  
  <pre><code>&lt;?php
              include('includes/login_connection.php');
  
          //  $query = "select * from personal_details, course_codes";
              $query = "select p.usn, p.name, p.sem, p.year, cg.cur_cgpa, c.cc1, c.cc2, c.cc3, c.cc4, c.cc5, c.cc6, c.cc7, c.cc8, c.cc9 from personal_details p, course_codes c, cgpa_details cg where p.usn = c.usn AND p.usn = cg.usn order by p.usn";
  
              $run = mysql_query($query) or die($query."&lt;br/&gt;&lt;br/&gt;".mysql_error()); 
              $num=mysql_numrows($run);
              echo "No. of registered students: $num";
              while($row = mysql_fetch_assoc($run)){
  
  
                  echo "&lt;tr&gt;";
                  echo "&lt;td&gt;" . $row['usn'] . " &lt;/td&gt;";
                  echo "&lt;td&gt;" . $row['name'] . " &lt;/td&gt;";
                  echo "&lt;td&gt;" . $row['sem'] . " &lt;/td&gt;";
                  echo "&lt;td&gt;" . $row['year'] . " &lt;/td&gt;";
                  echo "&lt;td&gt;" . $row['cur_cgpa'] . " &lt;/td&gt;";
                  echo "&lt;td&gt;" . $row['cc1'] . " &lt;/td&gt;";
                  echo "&lt;td&gt;" . $row['cc2'] . " &lt;/td&gt;";
                  echo "&lt;td&gt;" . $row['cc3'] . " &lt;/td&gt;";
                  echo "&lt;td&gt;" . $row['cc4'] . " &lt;/td&gt;";
                  echo "&lt;td&gt;" . $row['cc5'] . " &lt;/td&gt;";
                  echo "&lt;td&gt;" . $row['cc6'] . " &lt;/td&gt;";
                  echo "&lt;td&gt;" . $row['cc7'] . " &lt;/td&gt;";
                  echo "&lt;td&gt;" . $row['cc8'] . " &lt;/td&gt;";
                  echo "&lt;td&gt;" . $row['cc9'] . " &lt;/td&gt;";
                  echo "&lt;/tr&gt;";
  
      //      echo "&lt;/table&gt;";    
  
  
              }
              mysql_close($bd);
  
  ?&gt;
  </code></pre>
  
  <p>And html part is given in pics.. sorry i can not paste text</p>
  
  <p>![enter image description here][2]</p>
  
  <pre><code>&lt;table border='1' align="center" style="font-size:14px" width="95%" cellspacing="3" class="db_table" &gt;
  
  &lt;tr class="db_table_tr" &gt;
   &lt;th class="db_table_th" &gt;USN&lt;/th&gt;
   &lt;th class="db_table_th" &gt;Name&lt;/th&gt;
   &lt;th class="db_table_th" &gt;Sem&lt;/th&gt;
   &lt;th class="db_table_th" &gt;Year&lt;/th&gt;
   &lt;th class="db_table_th" &gt;CGPA&lt;/th&gt;
   &lt;th class="db_table_th" &gt;Subject-1&lt;/th&gt;
   &lt;th class="db_table_th" &gt;Subject-2&lt;/th&gt;
   &lt;th class="db_table_th" &gt;Subject-3&lt;/th&gt;
   &lt;th class="db_table_th" &gt;Subject-4&lt;/th&gt;
   &lt;th class="db_table_th" &gt;Subject-5&lt;/th&gt;
   &lt;th class="db_table_th" &gt;Subject-6&lt;/th&gt;
   &lt;th class="db_table_th" &gt;Subject-7&lt;/th&gt;
   &lt;th class="db_table_th" &gt;Subject-8&lt;/th&gt;
   &lt;th class="db_table_th" &gt;Subject-9&lt;/th&gt;
  &lt;/tr&gt;&lt;/table&gt;
  </code></pre>