HTML forms

HTML forms allow users to send query information over the net. Database and web programs from PubMed to Blast all use html forms for input query data.

The following html codes generate a form for querying Yahoo! search engine:


  <form name=f action="">
   <input type=text size=40 name=p>
   <input type=submit value=Search>


It looks like this:


Type in "bioinformatics" in the search field and click on Search. Note the address field of your browser has changed to: ?p=bioinformatics

Note the first half of the above URL is the value of "action" in the form, the "p" immediately after the question mark is the name of text input field in the form, and the value of "p" (in green) is your query.

You may search Yahoo! by changing the value of "p" in the URL. In the address field of your browser, change the URL to ?p=html+form

and hit return, you will be presented search results for HTML forms. For more information about html forms, check the results of your Yahoo! search.

Understanding how forms work, you will be able to generate links to databases, servers, etc., without using their input forms. See Perl Example 3 --- insert links for an application.