Go to Start Page

Posting Forms By Html

Search On:
    
   

1. Search Form for Google:

       
Google Search:

 
 +  Click to see the code

 

 

2. This example shows how to write HTML that submit forms

This is used to submit to other sites that expect certain variables. This one submits to http:\\www.hcidata.info
Actual Example:
       
Domain Name
IP Address

Here is how I did it:
      <form action="http:\\www.hcidata.info/host2ip.cgi" method=POST>
        <table width="585">
          <tr> 
            <td>Domain Name
            <td> 
              <input type="TEXT" name="domainname" size=35 maxlength=60 value="localhost">
            </td>
            <td> 
              <input type="SUBMIT" value=" Find IP Address " name="findIP">
            </td>
            <td rowspan="2">
          </tr>
          <tr> 
            <td>IP Address
            <td> 
              <input type="TEXT" name="ipaddress" size=15 maxlength=15 value="127.0.0.1">
            </td>
            <td> 
              <input type="SUBMIT" value=" Find Host Name " name="findHOST">
            </td>
          </tr>
        </table>
      </form>

Note the use of http:\\ instead of http:// in this code. This one uses POST method.
 


3. Another example: Submitting to the site www.iwhois.com


The url expects you to pass the following variables: (1)domain (2)tld and (3) lookup

All you need to do is to create the form with a little knowledge of HTML.

Here is the actual Example:


Shorter output Highlight key fields
Show status only

 

Here is how I did it:

 <form id="whoisform" name="whoisform"  action=http:\\www.iwhois.com/index.php method="get" >
 <input type="text" name="domain" >
 <select name="tld">
  <option value="com" SELECTED >.com
  <option value="net">.net
  <option value="org">.org
  <option value="cno" style="color:red;font-weight:bold;">.cno
  <option value="info">.info
  <option value="biz">.biz
  <option value="us">.us
  <option value="ca">.ca
  <option value="co.uk">.co.uk
  <option value="org.uk">.org.uk
  <option value="de">.de
  <option value="all" style="color:red;font-weight:bold;">.all
 </select>
 <input type="hidden" name="lookup" value="Lookup">
 <input type="submit" value="Lookup" name="submitbutton">
<table cellpadding="0" cellspacing="0" border="0"> <tr valign="middle"> <td align="left"><input type="checkbox" name="clean" value="1" CHECKED /> <td>Shorter output</td> <td align="left"><input type="checkbox" name="hilite" value="1" /> <td>Highlight key fields
<td align="left"><input type="checkbox" name="statusonly" value="1" /> <td>Show status only </tr> </table> </form>

Note: This one uses GET method to get values into the URL.

That's it!! Enjoy ~ Elrey Ronald