too long

i'm trying build a table that has a delete button for every entry, but the output is confusing me. The code is as follows:

                    if ($players != null) {

                        echo('<table class="playerTable">');
                        echo('<thead>');
                        echo('<tr>');
                        echo('<th> Last Name </th>');
                        echo('<th> First Name </th>');
                        echo('<th></th>');
                        echo('<th></th>');
                        echo('</tr></thead><tbody>');

                        for ($i=0; $i<count($players); $i++) {
                           printf('<form action="player.php" method="post" onSubmit="return submitCheck(\'%s\', \'%s\')">', $players[$i]->name, $players[$i]->surname);
                           echo("<tr>");
                           printf("<td> %s </td><td> %s </td>", $players[$i]->surname, $players[$i]->name);
                           echo('<td><input type="hidden" name="delete" value="'. $players[$i]->id .'"></td>');
                           echo('<td><input type="submit" value="Delete"></td>');
                           echo("</tr>");
                           echo('</form'); 


                        }
                        echo('</tbody></table>');
                    }

For some reason that i don't get, the produced output is as follows:

<tbody>
<form action="player.php" method="post" onsubmit="return submitCheck('someName', 'someName')"></form>
<tr>
    <td> someName </td>
    <td> someName </td>
    <td><input type="hidden" name="delete" value="1"></td>
    <td><input type="submit" value="Delete">
    </td>
</tr>

Which leads of course to the fact, that the submitCheck won't be executed - what am I missing here?

First of all, you shouldn't have a <form> tag within a <table>. Make it the other way around. Also, in your opening <form> tag, there's a missing = sign at the action attribute. The end tag of <form> should also be outside of the <table>.

There is no = in action"player.php" Try action="player.php"