topical media & game development

talk show tell print

basic-ajax-09-SaveList.php / php



  <?php   
                  xmlDoc = new DomDocument('1.0');
              mainNode = xmlDoc->createElement('books');
          mainNode = xmlDoc->appendChild(mainNode);
          
          foreach (_GET as key=>value)
          {
             childNode = xmlDoc->createElement('book');
             childNode = mainNode->appendChild(childNode);
          
             titleNode = xmlDoc->createElement('title');
             titleNode = childNode->appendChild(titleNode);
             
             textNode = xmlDoc->createTextNode(value);
             textNode = titleNode->appendChild(textNode);
          }
          
          xmlDoc->save('List.Xml');
  ?>


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.