Friday, 6 February 2015

In this action of the <form> tag, you will specify the URL of where the data will be sent. In almost all cases this will be a server side script (a program on the Web server that is identifies specially to accept form submissions and process the data in some way). As you may have guessed, there’s no point in having a form on your Website unless you also have the script to process it as you need. We will not teach you how to write scripts – that would take an entire book in itself – but some background information on scripts, where to find them, and where to install them would be provided.

Script Languages

Server-side scripts can be written in a wide variety of languages. The language does not really matter from the Web designer’s point of view as long as the script does its job.

  • Common Gateway Interface (CGI), is one of the original scripting technologies that is used on the Web. Despite being relatively old, it is still perfectly useful. Because it has been around so long, you will find lots of useful CGI scripts on the Web that you can download and use. CGI is not really a language, but rather a technology, and most CGI scripts are written in Perl.
  • Perl (Practical Extraction and Report Language) is another powerful scripting language. Perl is widely supported and there are lots of useful scripts available on the Web. Scripts are stored in files with the .pl extension.
  • Active Server Pages(ASP), is a Microsoft technology that has gained wide popularity. ASP scripts are written using the VBScript language, which can also be used to write client-side scripts. It is very powerful but does not enjoy as wide support as some other scripting technology. ASP script pages have the .asp extension.
  • PHP is rapidly gaining popularity as the server-side scripting language of the choice for many Webmaster. It’s easy to use and learn, and it’s open source and therefore free. A Web hosting provider does not have to pay in order to support PHP on their servers. PHP script pages have the .php extension.

When you locate a script that you want to use on your Website, be sure to check with your Web host. You need to know if they support the kind of script you will be using. You also need details on where on your Website to place the script file. These all can be told by web hosting company.

Client Side vs. Server-Side Scripts
A serve-side script is executed on the Web server and the result is returned to the user. A client-side script is embedded in an HTML page and is executed on the user’s computer.

Installing and Linking a Script

Once you have found a script you want to use, use FTP to upload it to proper folder of your Website. (For example, CGI scripts are traditionally kept in a folder named cgi-bin in your site’s root folder). Once the file has been uploaded, you will need to set the form’s action attribute like:

<form action=cgi-bin/myscript.pl>

Once the page containing the form is published, your users will be able to use the form and its attached script. Be sure to test forms and scripts that you publish to make sure they are working correctly.

Server-Side Script Resources

You must be wondering what things can scripts do and, where can you get the scripts. Here are just a few examples, of what scripts can do:
  • Send a submitted form’s data to more email recipients.
  • Present a user survey and compile the results.
  • Create a discussion forum that allows users to read and post messages on your site.
  • Display a countdown to a specific date.
  • Determine where your visitors come from and which browser they are using.
  • Rotate ad banners on your page.
  • Let users sign a guestbook.

I have listed some of resources for the script below:




0 comments:

Post a Comment