Embedding an Image in an HTML Page


Because phpbox.php creates a JPEG, you can assign it to the SRC attribute in an <IMG> element in an HTML document, as you see in phpbox.html, Example 2.

Example 2. Displaying an image in an HTML page, phpbox.html
 <HTML>     <HEAD>         <TITLE>             Embedding interactive images in HTML pages         </TITLE>     </HEAD>     <BODY>         <CENTER>             <H1>                 Embedding interactive images in HTML pages             </H1>             Here's a blank image created on the server:             <BR>             <IMG src="/books/1/265/1/html/2/phpbox.php">         </CENTER>     </BODY> </HTML> 

This HTML page appears in Figure 2complete with our image, as created on the server. Very cool.

Figure 2. Displaying an interactive image in an HTML page.




    Spring Into PHP 5
    Spring Into PHP 5
    ISBN: 0131498622
    EAN: 2147483647
    Year: 2006
    Pages: 254

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net