Dynamic Page Generation

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 http://www.php.net.
  • 27 Users Found This Useful
Was this answer helpful?

Related Articles

Can you change session cookie timeout in php.ini for me?

You can accomplish this without a php.ini setting by using the...

What extensions do I use for PHP? Text Tutorial

You can use .php, .php3 .phtml, .php4

What is PHP? Text Tutorial

PHP is a server-side HTML embedded scripting language used to create scripts and/or Web pages. In...

Why do I get a PHP 500 Error? Text Tutorial

Normallly, the permissions on php files should be 644 and the permissions on folders containing...