You have learnt that HTML forms are used to gather information from online visitors to your Web site. There are registration forms, there are subscription forms, there are survey forms, and there are navigational forms - forms galore, everywhere.
This time we'll make a form that collects information about the visitor at your site. You must have filled-in copious registration forms or survey forms where you had to enter your name, your email, your address, etc. Sometimes users, intentionally or unintentionally, enter wrong information that can either spoil your database scheme or give you lots of useless data and hence, waste your precious server space.
We'll revert back to our form processing script after having a peek at arrays. Technically, an array is a sequence of logically related data items. It's kind of a row made of boxes, with each box holding a value.
This is what you often see on various web sites - when you hover your cursor over an image, it metamorphoses into some other image. For instance, a simple two-dimensional button changing into three-dimensional with shadow underneath.
Remember the rollover effect? If there are just a couple of graphics to grapple with, it does not pose a problem, but an ideal navigation bar generally consists of more than 6 or 7 buttons that need to be rolled over. A very odd situation manifests itself when your mouse is over a button and it is taking ages for the rollover effect to happen.
Sometimes you don't want the visitor to leave your current page. So when a link it clicked, instead of a new page loading on the same window, you can have the page in a new browser window. All you have to do is...
Sometimes you don't want the visitor to be able to click the right mouse button and do all the stuff associated with it. Although personally I'm not in favor of such gimmicks and limit the visitor's independence, you learn something new in this tutorial.
In certain situations (classified ad, page description, security), you may want to limit the amount of text that can be put into a textarea form field. For regular input tags, you can use the maxlength attribute, but the textarea tag has no such built-in limit specifier.