CGI Script and Forms
What the CGI script does with the web form basically depends on the complexity of the form. In the case of a simple contact form, the CGI script for forms processor may do nothing but send the information entered in the form to an email address. (Usually contact forms are used to hide the recipient's actual email address, as exposing it on the website may result in tons of spam). But for a more advanced application, the CGI script form processor would be a very complex program which ties in with the database and carries out an assortment of functions.
CGI scripts are never a part of the HTML but rather separate programs that are installed on the web server. The location of the form processor is spelt out in the HTML codes in this manner:
The above code shows where the CGI script is located and must be installed and set up on your web server.
After designing a web form with any HTML editor to let our browser recognize where to forward the content of the form we need to add these properties:
<form>tag: action = address, method = post or method = get
The address is the location of the CGI script for forms on the web server that the content should be sent to, while the post and get methods are simply other ways of submitting to the CGI form script.