Why Is CGI Significant In Web Design And Development


PHP is a more popular scripting language for web design because it is free and it is has an open source license. A web developer does not need to pay for the license of using PHP as long as it is not for commercial purposes. With PHP, you can end up building a full packed interactive social media website, or a simple information site. You can build and run a business website with PHP, just like greasemania.com that doesn’t use a Content Management System like WordPress, which is popularly used nowadays.

However, when you are dealing with web pages, you will often hear people talk about CGI scripts. Actually, CGI is essentially the connection or interface between a form on the website and the website server.

Important facts about CGI

  1. CGI is not a program; it is the interface between the web page or browser and the server that runs the program. In fact, before JavaScript was introduced, web pages have no way of interpreting reader reaction except through the web server. Now, this interaction is done through scripts and programs that make use of common gateway interface to create interactive programs on pages.
  2. CGI can be used to run programs on your website; however, many of the free or less expensive web hosting providers does not allow CGI access on their servers.
  3. Programs and scripts that run on the web server can be used as a CGI program but most web developers prefer to use Perl, C, C++ and Unix shell scripts to write their CGI scripts.

How CGI is used in web design

CGI is used in the creation of Word documents that depend on user interaction. CGI scripts are used in resolving form data, in putting data into databases, in sending data in the form of an email message and in responding to the form entry with email or a different web page. CGI is also used for behind-the-scenes interaction with readers because they can read cookies and acquire information such as browser and operating system.

Many of the functions of CGI can be duplicated by new technology like JavaScript and ActiveX but many browsers do not support this newer technology. The primary advantage of using CGI instead of browser-based scripting is to ensure that all readers including those using outdated browsers will be able to use the programs. It is also common for many company firewalls to disallow new technology in their systems because of security and bandwidth reasons.

PHP – The Scripting Language For Building Dynamic Web Pages


PHP is a widely used scripting language and interpreter to create dynamic web pages. PHP is free with an open source license. This means that the open source license only covers the commercial use of the code. For example, if you want a blog for your website, Simple Blog PHP script can easily be installed into the website without worrying about the license. PHP is mainly focused on server-side scripting to collect form data, generate dynamic web page content or send and receive cookies. The script is also good for database access, disk access, networking and manipulation of text.

Why do more and more web developers use PHP?

  1. The traditional approach was to use CGI mechanism in adding interactivity but each new request requires the server to start a new process in the kernel that consumes CPU time and memory making the CGI mechanism a lot slower particularly when using multiple concurrent CGI scripts. PHP interpreter which is also called parser generates the HTML code in the server so it does not consume CPU time or memory.
  2. PHP is widely used in the web because it is free and it has a fully featured platform where the use can download the source code and executables and install them on the computer. If you are on a limited budget, PHP would be a good option in building dynamic data-driven websites.
  3. PHP is quite popular for being easy. The language is a combination of the best features of C and Perl.
  4. PHP has a native database support from MySQL, mSQL, Oracle, Sybase, Informix, Direct MS-SQL, PostgreSQL, Unix, dbm, IBM DB2, dBase, InterBase, FrontBase, Ingres, Hyperwave, Adabas D, Solid, FilePro, Empress, Ovrimos and Velocis that allow access to databases directly through SQL statements. In addition PHP supports Open Database Connection (ODBC) standards that will allow you to connect to other databases supporting the standard.
  5. PHP is compatible with majority of operating systems like Linux and its variations, Microsoft Windows, Mac OS X, RISC OS and many others. Majority of web servers support PHP and they have the PHP interpreter module. With PHP you have a wide range of choice for server-side scripting ad command line scripting.