<p>I'm trying to make a page in php that takes rows from a database, displays them, and then give the viewer a chance to upvote or downvote a specific entry. Here is a snippet:</p>

<pre><code>echo("&lt;form action=\"vote.php\" method=\"post\"&gt; \n");
echo("&lt;INPUT type=\"hidden\" name=\"idnum\" value=\"".$row[0]."\"&gt;");
echo("&lt;INPUT type=\"submit\" name=\"up\" value=\"Upvote.\"&gt;  \n");
echo("&lt;INPUT type=\"submit\" name=\"down\" value=\"Downvote\"&gt; ");
echo("&lt;form/&gt;\n");
</code></pre>

<p>The problem is when I hit a submit button, the value for idnum that gets sent is based on the one farthest down it seems. So my questions is, when a submit button is pressed, are the values for all inputs on a page sent?</p>

Your form is not closed properly. Use
```
</form>
```
instead of
```
<form/>
```
.