Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include('SQLparseQuery.php');
- include('queryToXML.php');
- $rows = array('code', 'name', 'price', 'description');
- $filter = array("", "featured='1'");
- $coffeeList = getFromSQL('*', 'coffees', $rows, $params=$filter); //Retrieves only featured coffees from SQL
- makeXML($coffeeList, $rows, "coffee", "featuredCoffees", true); //writes featuredCoffees.xml
- header('Content-type: text/xml');
- echo file_get_contents("../xml/featuredCoffees.xml");
- ?>
- function featuredInteraction() {
- if (request.readyState==4) {
- if (request.status==200) {
- alert(request.responseXML);
- }
- }
- }
Add Comment
Please, Sign In to add comment