Register A Domain
Knowledgebase: PHP
Dynamic Page Generation
Posted by Michael Torner on 04 May 2012 01:38 PM

Another common use of PHP with a SQL server is the ability to create web pages on the fly. Using a template page written in PHP you can retrieve images, text , etc. from an SQL server to construct the final HTML page that is seen by the web browser. A classic example of this is a product information page. Instead of generating hundreds of HTML pages, each describing a separate product and consuming much disk space, product descriptions, photographs and other information are stored in an SQL database, and a template PHP is generated. When a client requests information on a certain product number, the PHP template requests the corresponding information from the database, and constructs a completed web page of the product information that is presented to the client. This approach saves much work, especially when the time comes to alter product information, add/remove products and other site management tasks.
There are many books and tutorials for PHP online. You can also find documentation for PHP at

Comments (0)