<?php while ($note = $todoNotes->fetch()) { ?> <tr> <td><?php echo $note["todoNote"]; ?> </td> <td><?php echo $note["catName"]; ?> </td> <td><?php echo dateFormatFromSql($note["dueDate"]); ?> </td> <td><?php echo $note["completed"] == 0 ? "NO" : "YES"; ?> </td> </tr> <?php } ?> </table>
?> </td> <td><?php echo $note["catName"]; ?> </td> <td><?php echo dateFormatFromSql($note["dueDate"]); ?> </td> <td><?php echo $note["completed"] == 0 ? "[ ]" : "[X]"; ?> </td> <td><?php echo dateFormatFromSql($note["addDate"]); ?> </td> <td> <form method="post"> <!-- I can't get the edit function to work properly so am commenting out the button for now, code stays <input type="submit" name="action" value="Edit">--> <input type="submit" id="deleteButton" name="action" value="Delete"> <input type="hidden" name="todoId" value="<?php echo $note["noteId"]; ?> "> </form> </td> </tr>