You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

listToReserve.php 431B

123456789101112131415161718
  1. <?php
  2. $reserve = $_POST['reserve'];
  3. $doc = new DOMDocument;
  4. $doc->load('../db/links.xml');
  5. $xpath = new DOMXpath($doc);
  6. // Buffering and deleting moved element
  7. foreach($xpath->query('label/link[title = "'.$reserve.'"]') as $node) {
  8. $buffer = $node;
  9. $node->parentNode->removeChild($node);
  10. }
  11. $searchLabel = $xpath->query('reserve');
  12. $searchLabel->item(0)->appendChild($buffer);
  13. $doc->save('../db/links.xml');