<td><button id="btnFind" onclick="submit()" >Find</button></td> </tr> </table> <?php } ?> <br/> <table border="1" cellspacing="0" width="550" align="center" class="ui-corner-all"> <tr class="ui-widget-header"> <th style="width: 300px">Item</th> <th style="width: 100px">Excess</th> </tr> <?php include_once "../model/Item.php"; $itemObj = new Item(); $items = $itemObj->getExcess($_POST['txtDate1'], $_POST['txtDate2']); foreach ($items as $item) { if ($item["excess"] != 0) { ?> <tr> <td> <?php echo $item["name"]; ?> </td> <td align="right"> <?php echo $item["excess"]; ?> </td> </tr>