Guest User

Untitled

a guest
Jul 19th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. <?php
  2.  
  3. include('SQLparseQuery.php');
  4. include('queryToXML.php');
  5. $rows = array('code', 'name', 'price', 'description');
  6. $filter = array("", "featured='1'");
  7. $coffeeList = getFromSQL('*', 'coffees', $rows, $params=$filter); //Retrieves only featured coffees from SQL
  8. makeXML($coffeeList, $rows, "coffee", "featuredCoffees", true); //writes featuredCoffees.xml
  9.  
  10. header('Content-type: text/xml');
  11. echo file_get_contents("../xml/featuredCoffees.xml");
  12.  
  13. ?>
  14.  
  15. function featuredInteraction() {
  16. if (request.readyState==4) {
  17. if (request.status==200) {
  18. alert(request.responseXML);
  19. }
  20. }
  21. }
Add Comment
Please, Sign In to add comment