title: python + flask passing data from html back to python script (specifically the value of a label)
body: <p>I am using python and flask to make a web app. I am new to it, but have gotten most of what I am trying to accomplish done. Where I am stuck, is that I have a label whose value is a python variable( {{id}} ) This id is the id of a row I need to update in a sqlite database. My code is below. when I click the approve button, it takes me to a route which does the update query, but I have no way to pass the {{id}} with it. This would have been much easier if I could have just used javascript for the update query, but everything I've found using javascript, is for web sql, not sqlite, even though some of them say they are for sqlite.</p>
  
  <pre><code>&lt;/script&gt;
  &lt;table border='1' align="center"&gt;
      {% for post in posts %}
      &lt;tr&gt;
          &lt;td&gt;
              &lt;label&gt;{{post.id}}&lt;/label&gt;
              &lt;h1 id ='grill1'&gt;{{post.photoName}}&lt;/h1&gt;
              &lt;span&gt;
                  &lt;img id = 'photo1' src='{{post.photo}}' alt="Smiley face" height="200" width="200"&gt;
              &lt;/span&gt;&lt;br&gt;
              &lt;h5 id ='blurb1'&gt;
                  {{post.blurb}}
              &lt;/h5&gt;
              &lt;br&gt;
              &lt;div style=" padding:10px; text-align:center;"&gt;
          &lt;input type="button"   value="Approve" name="approve" onclick="window.location='/approve;"&gt; 
  
          &lt;input type="button" value="Deny" onclick="window.location='/deny';"&gt;&lt;br&gt;
      &lt;/div&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      {% endfor %}
  &lt;/table&gt;
  </code></pre>