Server Side Programming

To understand server-side programming one must first understand how a basic .html page works. When a .html file is uploaded to a server nothing ever changes unless the actual .html file is edited by the webmaster. Each time that an .html file is requested by a browser the server finds the file and sends it back to the browser. This is the basis behind static web pages.


Creating pages with .php, .asp, .pl, .cgi, or .cfm extensions allows the webmaster to introduce server side programming. The programming languages that reside on these pages are able to run program on the server which created HTML "on the fly". This is known as dynamic web pages. Each time when of these file types is requested by a browser the server runs the program located within the page then creates HTML which is then returned to the browser by the server.


One of the most commonly used server-side programming languages is PHP or Hypertext Preprocessor. When a visitor points there browser to a PHP document, the server processes the PHP commands and then sends the results back to the visitor's browser. However, unlike ASP or ColdFusion PHP is Open Source as well as cross-platform. In addition to manipulating the content of your pages, PHP can send HTTP headers. What exactly does this mean? PHP allows you to set cookies, manage authentication as well as redirect users. One very important aspect of a dynamic website is its database. PHP offers excellent connectivity to many databases such as MYSQL as well as integration with various external libraries. Another advantage is that PHP does not require any special development environments and will go right into a web page using <?php as the start tag and ?> as the end tag.


Without server-side programming the majority of major websites would not exists. Many websites use content management scripts which require server-side programming coupled with a database. Online stores require server-side programming and databases. Without this technology stores that offered 1000's of products would have to contain 1000's of static pages which would be extremely hard to manage. With server side programming and a database, product information can be pulled from a database and placed on a page prior to a visitor pulling up the page on their browser. This also holds true with content management systems.