title: Dynamic page. Trouble with getting data
body: <p>I've got  more than 20 links they look like:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div&gt;
  &lt;a href='writer.php?id=1'&gt;1st Writer&lt;/a&gt;
  &lt;a href='writer.php?id=2'&gt;2nd Writer&lt;/a&gt;
  &lt;a href='writer.php?id=3'&gt;3d Writer&lt;/a&gt;
  &lt;a href='writer.php?id=4'&gt;4th Writer&lt;/a&gt;
  &lt;a href='writer.php?id=5'&gt;5th Writer&lt;/a&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>How can i get "id" from each href='writer.php?id=' ' and pass it to $id writer.php?</p>
  
  <p>writer.php:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?$servername = "localhost";
  $username = "root";
  $password = "";
  $dbname = "test.com";
  $conn = mysqli_connect($servername, $username, $password, $dbname);
  
  if (!$conn) {
      die("Connection failed: " . mysqli_connect_error());
  }
  
  $sql = "SELECT * FROM articles WHERE id='$id'";
  $result3 = mysqli_query($conn, $sql);
  
  
  if (mysqli_num_rows($result3) &gt; 0) {
  
      while ($row = mysqli_fetch_assoc($result3)) {
  
          echo $row[text];
      }
  }
  mysqli_close($conn);?&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I just want to click on link and display at new page(writer.php) my data from database where id = that number from href.
  But i dont know how to...</p>