<?php header("Content-type: text/xml"); $xml = "<?xml version=\"1.0\"?>\n"; echo $xml; if(isset($_GET["id"])){ $id = $_GET["id"]; if($id == 1){ ?> <pie> <slice title="Category One">3</slice> <slice title="Category Two">110</slice> <slice title="Category Three">294</slice> <slice title="Category Four">32</slice> <slice title="Category Five">2076</slice> <slice title="Category Six">355</slice> <slice title="Category Seven">821</slice> </pie> <?php }else if($id == 2){ ?> <pie> <slice title="Category Eight">123</slice> <slice title="Category Nine">20</slice> <slice title="Category Ten">265</slice> <slice title="Category Eleven">13</slice> <slice title="Category Twelve">183</slice> </pie> <?php }else{ ?> <pie> <slice title="Category Thirteen">23</slice> <slice title="Category Fourteen">540</slice> <slice title="Category Fifteen">74</slice> <slice title="Category Sixteen">842</slice> <slice title="Category Seventeen">958</slice> <slice title="Category Eighteen">45</slice> </pie> <?php } } ?>