title: Pass value to next page on table row click?
body: <p>I have a table that is not currently clickable. On row click, I would like to go to a detail page from this table, passing the id value in the process.</p>
  
  <p>I understand I need to make an href on the table row and somehow pass the id value on click, but am not clear on how to do this. Relevant table and php:</p>
  
  <pre><code>  &lt;div class="row"&gt;
                      &lt;div class="col-12"&gt;
                          &lt;div class="card"&gt;
                              &lt;div class="card-body"&gt;
                                  &lt;div class="table-responsive m-t-40"&gt;
                                      &lt;table id="example23" class="display nowrap table table-hover table-striped table-bordered" cellspacing="0" width="100%"&gt;
                                          &lt;thead&gt;
                                              &lt;tr&gt;
                                              &lt;thead&gt;&lt;tr&gt;&lt;th title="Field #1"&gt;id&lt;/th&gt;
                                              &lt;th title="Field #2"&gt;Organization&lt;/th&gt;
                                              &lt;th title="Field #3"&gt;xxx&lt;/th&gt;
                                              &lt;th title="Field #4"&gt;xxx&lt;/th&gt;
                                              &lt;th title="Field #5"&gt;xxx&lt;/th&gt;
                                              &lt;th title="Field #6"&gt;xxx&lt;/th&gt;
                                              &lt;/tr&gt;
                                          &lt;/thead&gt;
                                          &lt;tbody&gt;
  
                                              &lt;?php
  
                                                  $servername = "xxx";
                                                  $username = "xxx";
                                                  $password = "xxx";
                                                  $dbname = "xxx";
  
                                                  // Create connection
                                                  $conn = new mysqli($servername, $username, $password, $dbname);
  
                                                  // Check connection
                                                  if ($conn-&gt;connect_error) {
  
                                                      die("Connection failed: " . $conn-&gt;connect_error);
  
                                                  }else{
  
                                                      echo '&lt;script&gt;console.log("Connection successful!")&lt;/script&gt;';
  
                                                  }
  
                                                  $SELECT = mysqli_query($conn,"SELECT * FROM `organization`");
  
                                                  if($SELECT != false)
                                                  {
                                                      while($rows = mysqli_fetch_array($SELECT))
                                                      {
                                                          echo "
                                                              &lt;tr&gt;
                                                                  &lt;td&gt;".$rows["id"]."&lt;/td&gt;
                                                                  &lt;td&gt;".$rows["name"]."&lt;/td&gt;
                                                                  &lt;td&gt;".$rows["xxx"]."&lt;/td&gt;
                                                                  &lt;td&gt;".$rows["xxx"]."&lt;/td&gt;
                                                                  &lt;td&gt;".$rows["xxx"]."&lt;/td&gt;
                                                                  &lt;td&gt;".$rows["xxx"]."&lt;/td&gt;
                                                              &lt;/tr&gt;
                                                              ";
                                                      }
                                                  }else{
                                                      echo "
                                                          &lt;tr&gt;
                                                          &lt;td colspan='3'&gt;Something went wrong with the query&lt;/td&gt;
                                                          &lt;/tr&gt;
                                                      ";
                                                  }
  
                                              ?&gt;
  
                                          &lt;/tbody&gt;
                                      &lt;/table&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
  </code></pre>
  
  <p>How do I make my table rows clickable (to go to the detail page) and how do I pass the id value from the table on click to the detail page?</p>