4.2. Using PL/SQL to Create Web Pages
The biggest reason that we need to write programs that generate HTML pages "on-the-fly" is to extract (or store) information from the database. You cannot produce these pages in advance because their content depends on information that is potentially changing all the time. In this book, I refer to these as dynamic pages. Be careful, though; this term can easily confuse. As I use the term, "dynamic" does not mean that the page is full of animated images, dancing monkeys, and unsightly blinking text. Nor does "dynamic" refer to dynamic HTML (DHTML), which is a relatively new extension to HTML you can read about in a dozen different books (not this one, I'm afraid). Even HTML stored in static files can have animation and DHTML. Instead, in this book I'm using the term dynamic to refer to the generation method, not the visual result; it means that the HTML that arrives at the user's browser was output from a computer program and not merely copied from a file.
A common use of dynamic pages is to respond to requests the user makes by filling out a form on a web page. For example, if a library patron wants to find a particular book, he or she would enter some search criteria into a form on the screen. The system would search the database for anything matching the criteria, and then deliver a dynamically-built results page to the user. As you might guess, when compared with writing a static page, it's more complex to write a program that generates ...
Get Learning Oracle PL/SQL now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.