I assume you want the final output to look something like this:
_______________________________
| Bracket Number | Team Names |
| ----6 |team 6 |
| ----5 |team 5 |
| ----3 |team 3 |
| ----9 |team 9 |
//ect
First we should start with the field names. Instead of
<input type="text" name="teamname1" />
<input type="text" name="teamname2" />
use
<input type="text" name="teamname[0]" />
<input type="text" name="teamname[1]" />
This will make is so all posted results are in an array
$_POST['teamname'][0]
$_POST['teamname'][1]
//ect
This eliminates the need for the user to select the number of teams again. Which would cause an additional mess if they deiced to select 12 instead of he original 10, whether it is intentionally or by mistake. Also if you need to pass data from a form entry on a previous page store it in an hidden field. But you shouldn't need that now if you use the new naming convention.
Then you can output the data like so
<table border="1">
<tr>
<td>Bracket Number</td>
<td>Team Names</td>
</tr>
<?php
$teamname = shuffle($_POST['teamname']);
for ($i = 0; $i < count($teamname); $i++)
{
?>
<tr>
<td><?php echo $i; ?></td>
<td><?php echo $teamname[$i]; ?></td>
</tr>
<?php
}
?>
</table>
Yes, one less loop and I am using [man]shuffle[/man] which is much better than your randomizing method. In theory your method may never get all the values out of the array, as a truly random number may never hit all the numbers even in a small range. But even if does it could be taking hundred of loops wasting processing cycles and, potential, when combined with other code slowing down your site, diminishing the users experience.
PS. I am guessing you are new to HTML. While looking at the output source I saw this in your table
<table border="2" align="left" "top">
I assume the "top" is mistake but it should be noted that HTML5 will not support any of that. The "border" must be "" or "1" and the "align" attribute will not be supported at all. You will want to look into CSS for your alignment needs. Currently most browsers will support the old HTML4 but you may want to try and set your site up to be HTML5 compatibility if you plan on having it around for awhile.