title: Appending HTML Element's value in PHP page link
body: <p>I have an HTML file as follows:</p>
  
  <pre><code>&lt;html&gt;
  
  &lt;body&gt;
    &lt;div id="container"&gt;
      &lt;section&gt;
        &lt;article id="news-card"&gt;
          &lt;div id='identity'&gt;011&lt;/div&gt;
          &lt;h1&gt;HEADLINE&lt;/h1&gt;
          &lt;p&gt;AUTHOR&lt;/p&gt;
          &lt;a href='#' class='readmore'&gt;Read more&lt;/a&gt;
          &lt;form action='postnews.php' method='post'&gt;
            &lt;input type='checkbox' name='bookmark'&gt;Bookmark?&lt;/input&gt;
          &lt;/form&gt;
        &lt;/article&gt;
        &lt;section&gt;
    &lt;/div&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>and here's the PHP file:</p>
  
  <pre><code>&lt;?php
  $servername = "localhost";
  $username = "root";
  $password = "";
  $dbname = "News-Articles";
  
  // Create connection
  $conn = mysqli_connect($servername, $username, $password, $dbname);
  // Check connection
  if (!$conn) {
      die("Connection failed: " . mysqli_connect_error());
  }
  
  $_bookmark = isset($_POST["bookmark"]) ? 'Y' : 'N';
  $sql =     "INSERT INTO stats (iid, bookmark, readmore, counter)
             VALUES ('$_iid', '$_bookmark', NULL, NULL)
             ON DUPLICATE KEY UPDATE
             bookmark = '$_bookmark';"
  mysqli_query($conn, $update);
  mysqli_close($conn);
  ?&gt;
  </code></pre>
  
  <p>I want to include the value of the element with id = 'identity' into the form's action attribute. Something like this:</p>
  
  <pre><code>&lt;form action = "postnews.php?iid=getElementById(identity).innerHTML"&gt;
  </code></pre>
  
  <p>So, in the PHP file, I can <code>$_GET["iid"]</code> to insert the value of bookmark for that particular iid. How can I approach the solution?</p>