Two submit buttons in one form that act like links
<p>I'm making a website form that grabs tables from my database and gives the user the ability to vote on them (vote up/vote down)..</p>

<p>To do this I made a SQL statement that selects all from my table in the database, then does a loop adding to a string that displays the contents of the table to the user in a formatted manner. In this output string I have it so there are submit buttons with hidden input types with the postid. My idea is that each row in the table would have its own set of submit(vote up, vote down) buttons and will pass the value from the hidden field to the corresponding page. </p>

<pre><code>while (results.next() &amp;&amp; i &lt; 10) {
                output += "&lt;form name='feed' method='POST'&gt;&lt;a href=postid.jsp?id="
                        + results.getString("id") + "&gt;"
                        + results.getString("id") + "&lt;/a&gt; - &lt;input type='hidden' name='postid value='"
                        + results.getString("id") + "'&gt;"
                        + results.getString("content") + "&lt;br&gt; &lt;input type='submit'   value='Thumbs up("
                        + results.getString("upvote") + ")'&gt; | &lt;input type='submit'   value='Thumbs down.("
                        + results.getString("downvote") + ")'&gt;| "
                        + results.getString("gender") + " - "
                        + results.getString("userid") + "&lt;br&gt;&lt;br&gt;&lt;/form&gt;";
</code></pre>

<p>My question is, how would I approach this. The way I did above does not do anything. I know I need some sort of Javascript from reading online. </p>

<p>The way it outputs is:</p>

<pre><code>postid - POST CONTENT 
THUMBS UP(x) | THUMBS DOWN(x)
- MALE - user120123
</code></pre>

<p>Thanks.</p>
