<form name="frmUser" method="post" action=""> <table border="0" cellpadding="10" cellspacing="0" width="500" align="center"> <tr class="tableheader"> </tr> <?php $rowCount = count($_POST["users"]); for($i=0;$i<$rowCount;$i++) { $result = mysql_query("SELECT * FROM users WHERE userId='" . $_POST["users"][$i] . "'"); $row[$i]= mysql_fetch_array($result); ?> <tr> <td> <table border="0" cellpadding="10" cellspacing="0" width="500" align="center" class="tblSaveForm"> <tr> </tr> <tr> </tr> </tr> </tr> </table> </td> </tr> <?php } ?> <tr> <td colspan="2"> <input type="submit" name="submit" value="Update" class="btnSubmit"> </td> </tr> </table> </form>