daily pastebin goal
40%
SHARE
TWEET

Untitled

a guest May 16th, 2018 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $doc = new DOMDocument();
  3. $doc->load( 'things.xml' );
  4. $things = $doc->getElementsByTagName( "thing" );
  5. ?>
  6.  
  7. <html>
  8. <body>
  9.  
  10. <h1>List of things</h1>
  11.  
  12. <ul>
  13.   <?php foreach( $things as $thing ){ ?>
  14.     <li>
  15.     <?php echo $thing->nodeValue; ?>
  16.     </li>
  17.   <?php } ?>
  18. </ul>
  19.  
  20. <form action="submit.php" method="post">
  21. New thing: <input type="text" name="thing" />
  22. <input type="submit" value="Create" name="create"/><br>
  23. <input type="submit" value="Clear things" name="clear"/>
  24. </form>
  25.  
  26. </body>
  27. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top