396 CHAPTER 13 (Bulletproof web design) CASE STUDY: USING PHP
Saturday, January 12th, 2008396 CHAPTER 13 CASE STUDY: USING PHP FOR AN XML APPLICATION standard.php The standard.php page determines what content to display on the page. If the page has set the $city variable, the users have chosen a city and wish to see the weather. Figure 13-10 shows the content that displays when the $city variable is set but when there are no weather entries. Figure 13-10. Displaying city details where no weather is entered If the $city variable hasn t been set, the page needs to display further navigation so users can navigate to the city level. The standard.php page follows: load(’weather.xsl’); } else { include ‘mk_navxml.php’; $xsl->load(’nav.xsl’); } $xml->loadXML($xml->saveXML()); $proc = new XsltProcessor(); $xsl = $proc->importStylesheet($xsl); $xml = $proc->transformToDoc($xml); echo $newdom->saveXML(); ?>
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.