title: How to insert the values of a radio button and checkbox to my database with jsp?
body: <p>i'm having some troubles with my code and i don't know how to continue.</p>
  
  <p>What i have is a web page that shows a list of tweet previously searched by the user.</p>
  
  <p>Now what i want is to that the user could give some information about the search, something like if it was helpfull and in what area(sport, shopping, computing..) should it be.</p>
  
  <p>The code i have is something this:</p>
  
  <pre><code>&lt;table class="display dataTable no-footer" id="DataTables_Table_0"&gt;
                          &lt;%
                              Class.forName("com.mysql.jdbc.Driver");
                              Connection connect = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "test", "test");
                              Statement statement = connect.createStatement();
                              String query = "select * from cataluna_sin;";
                              ResultSet rs = statement.executeQuery(query);
                              while (rs.next()) {
                          %&gt;
                          &lt;tr&gt;
                          &lt;tr&gt;
                              &lt;td&gt;&lt;b&gt;tweet&lt;/b&gt;&lt;/td&gt;
                              &lt;td&gt;&lt;b&gt;retweet&lt;/b&gt;&lt;/td&gt;
                              &lt;td&gt;&lt;b&gt;usuario&lt;/b&gt;&lt;/td&gt;
                              &lt;td&gt;&lt;b&gt;Geolocalización&lt;/b&gt;&lt;/td&gt;
                              &lt;td&gt;&lt;b&gt;creador&lt;/b&gt;&lt;/td&gt;
                              &lt;td&gt;&lt;b&gt;¿Relevante?&lt;/b&gt;&lt;/td&gt;
                              &lt;td&gt;&lt;b&gt;Tipo de Delito&lt;/b&gt;&lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;%
                              while (rs.next()) {
                          %&gt;
                          &lt;tr&gt;
                              &lt;td&gt;&lt;%=new String(rs.getString("tweet").getBytes("ISO-8859-1"), "UTF-8")%&gt;&lt;/td&gt;
                              &lt;td&gt;&lt;%=rs.getInt("retweets")%&gt;&lt;/td&gt;
                              &lt;td&gt;&lt;%=rs.getString("usuario")%&gt;&lt;/td&gt;
                              &lt;td&gt;&lt;%=rs.getString("geolocalizacion")%&gt;&lt;/td&gt;
                              &lt;td&gt;&lt;%=rs.getString("creador")%&gt;&lt;/td&gt;
                              &lt;td&gt;
  
                                  &lt;form action=Update onsubmit=refreshpage();return false&gt;
                                      &lt;input type="radio" value="No" name="&lt;%=rs.getLong("id")%&gt;"
                                          checked&gt;No&lt;br&gt; 
                                      &lt;input type="radio" value="Si"
                                          name="&lt;%=rs.getLong("id")%&gt;"&gt;Si&lt;br&gt;
                              &lt;/td&gt;
                              &lt;td&gt;&lt;/td&gt;
                              &lt;td&gt;
                              &lt;input type="submit" value="clasificar"&gt;&lt;/td&gt;
                              &lt;/form&gt;
                          &lt;/tr&gt;
                          &lt;%
                              }
                              }
                          %&gt;
                      &lt;/table&gt;
  </code></pre>
  
  <p>what i want i to update the database when they press the submit button, but i don't know how.</p>