PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY on (Photo web hosting)

PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY on the server and creates the XHTML needed to display the page with a random choice of image. The server chooses the image filename and inserts it into the tag before sending the page to the browser. You can even use images of different sizes, because the PHP code detects the dimensions of the image and inserts the correct width and height attributes. What PHP does is enable you to introduce logic into your web pages. Chapter 3 covers this subject in detail, but this logic is based on alternatives. If it s Wednesday, show Wednesday s TV schedules . . . If the person who logs in has administrator privileges, display the admin menu; otherwise, deny access . . . that sort of thing. PHP bases some decisions on information that it gleans from the server: the date, the time, the day of the week, information held in the page s URL, and so on. At other times, the decisions are based on user input, which PHP extracts from XHTML forms. As a result, you can create an infinite variety of output from a single script. For example, if you visit my blog at http://foundationphp.com/blog/ (see Figure 1-2), and click various internal links, what you see is always the same page, but with different content. Admittedly, I tend to write always about the same kinds of subjects, but that s my fault, not PHP s. Figure 1-2. Blogs are a good example of sites ideally suited to PHP. Another website that I have created and maintained for several years, a subscription-only Japanese-language site (see Figure 1-3), is driven entirely by PHP. The navigation menu appears on every page of the site, but it s contained in a completely separate file, so if it
Check Tomcat Web Hosting services for best quality webspace to host your web application.

Leave a Reply