POST a hidden input + multiple options PHP
<p>Hi there I'm quite new to PHP</p>

<p>I have this problem:</p>

<p>I would like to POST a multiple choice + a hidden field from a form:</p>

<pre><code>&lt;?php
if (isset($_SESSION['nickname']))
{
    $result = mysql_query("SELECT * FROM users");
    $teamsCount = ceil(mysql_num_rows($result)/2);
    for ($i=1; $i&lt;=$teamsCount; $i++)
    {
        // TEST: echo $i . " TeamsCount er: " . $teamsCount. "&lt;br&gt;"; 
?&gt;
Team &lt;? echo $i; ?&gt; 
&lt;form name="addTeam" action="buildTeams.php" method="POST"&gt;
    &lt;input type="hidden" name="hiddenField" value="&lt;?php $i; ?&gt;" /&gt;
    &lt;select name="teams[]" multiple="multiple" size="&lt;?php echo mysql_num_rows($result); ?&gt;"&gt;
    &lt;?php 
        $query = mysql_query("SELECT * FROM users");
        while ($row=mysql_fetch_array($query)) 
        {
            $id=$row["ID"];
            $nick=$row["Nick"];
    ?&gt;
    &lt;option value="&lt;?php echo $id; ?&gt;"&gt;&lt;?php echo ucfirst($nick); ?&gt;&lt;/option&gt;
&lt;?php   
        } 
?&gt;
    &lt;/select&gt;
    &lt;input type="submit" value="Make them teams!!" /&gt;
&lt;/form&gt;
&lt;?php 
    }
} 
?&gt;
</code></pre>
