Hello,
So I'm trying to have a checkbox removed on submit if it's checked. This probably needs to be done with javascript, but I thought I'd see what other people thought here first.
First, I have an xml file that is structured like so:
<root>
<child1></child1>
<child2></child2>
<child3>
<item1></item1>
<item2></item2>
</child3>
</root>
Next, I have a php page that displays the contents of the .xml file by using simplexml and a small foreach loop. On this page, below the contents of the .xml file being displayed, there are checkboxes for each <item> in the .xml file.
When one (or all) of these checkboxes are checked followed by the submit button being pressed, the <item> tag(s) and anything within them are removed from the .xml file. This works fine. However, the actual checkbox for the item that was just removed stays on the page until it is checked off again and the submit button is pressed, again.
I just want the checkbox to be removed along with the <item> that it corresponds to. Now like I said before, this is probably done with javascript since I can't think of how to do this with php, but if anyone has any suggestions, let me know
Thanks.