Hashemian Blog

Web Tools, Financial Markets, Technology

Sunday, February 04, 2007

HTML Forms, Part 3 

Click here to read Part 2

The following is a simple example of an HTML form:
<form method="post" action="page.php">
Name: <input type="text" name="Name"><br>
City: <input type="text" name="City"><br>
<input type="submit" value="Submit">
</form>
This basic segment is placed inside an HTML page and when users browse to that page, they generally see something like this:
Name:
City:

The user is expected to fill in values for the Name and City and submit the form. Upon submission, the data is encoded, posted back to the server and routed to 'page.php' for handling. The general transmission is something like the following:
POST /page.php HTTP/1.1
Host: www.website.com
User-Agent: Mozilla/5.0
Content-Length: 27
Content-Type: application/x-www-form-urlencoded

Name=John+Doe&City=New+York
The first paragraph is the header describing the size and MIME type of the data among other information. The second paragraph contains the submitted data in an encrypted format with the fields delimited with '&'. The handling page, 'page.php', would generally contain a script to digest the data and take some kind of an action, such as validating the data, saving them to a database, or look up and display related information based on the submitted data.

This, of course, is a simple form, but all HTML forms behave the same way at their cores. Debugging forms is a relatively straight-forward task these days. The simplest step is to have the receiving page just print out the submitted values back to make sure that the page is correctly receiving the submitted data. Sometimes, however, it might be helpful to inspect the POST data in raw format. In those cases, scripts can be written to receive the data and display them without any processing. There are also utilities available online that can be used to achieve the same task with ease.

This site also has one such tool available that users can utilize to view their form POST data in raw format. To use this tool, the 'action' parameter of the form is set to the page's URL.Tthe form is then populated and submitted and the page. Upon submission, the POST data is displayed to the user. Visit Form Post Tester/Viewer for more information on this tool.
,,,,,,

Labels: , ,

<HTML Forms, Part 3>

0 comments

0 Comments:

Post a Comment

This page is powered by Blogger. Isn't yours?

Links
  • Hashemian Blog Feeds
  • Add to Google
  • Read Hashemian.com/blog/ with Bloglines
  • Subscribe to Hashemian.com/blog/ with My Yahoo!
  • Technorati Profile
  • TMCnet.com
  • ARCHIVES
  • 09/01/2003 - 10/01/2003
  • 03/01/2004 - 04/01/2004
  • 04/01/2004 - 05/01/2004
  • 05/01/2004 - 06/01/2004
  • 06/01/2004 - 07/01/2004
  • 07/01/2004 - 08/01/2004
  • 08/01/2004 - 09/01/2004
  • 09/01/2004 - 10/01/2004
  • 10/01/2004 - 11/01/2004
  • 11/01/2004 - 12/01/2004
  • 12/01/2004 - 01/01/2005
  • 01/01/2005 - 02/01/2005
  • 02/01/2005 - 03/01/2005
  • 03/01/2005 - 04/01/2005
  • 04/01/2005 - 05/01/2005
  • 05/01/2005 - 06/01/2005
  • 06/01/2005 - 07/01/2005
  • 07/01/2005 - 08/01/2005
  • 08/01/2005 - 09/01/2005
  • 09/01/2005 - 10/01/2005
  • 10/01/2005 - 11/01/2005
  • 11/01/2005 - 12/01/2005
  • 12/01/2005 - 01/01/2006
  • 01/01/2006 - 02/01/2006
  • 02/01/2006 - 03/01/2006
  • 03/01/2006 - 04/01/2006
  • 04/01/2006 - 05/01/2006
  • 05/01/2006 - 06/01/2006
  • 06/01/2006 - 07/01/2006
  • 07/01/2006 - 08/01/2006
  • 08/01/2006 - 09/01/2006
  • 09/01/2006 - 10/01/2006
  • 10/01/2006 - 11/01/2006
  • 11/01/2006 - 12/01/2006
  • 12/01/2006 - 01/01/2007
  • 01/01/2007 - 02/01/2007
  • 02/01/2007 - 03/01/2007
  • 03/01/2007 - 04/01/2007
  • 04/01/2007 - 05/01/2007
  • 05/01/2007 - 06/01/2007
  • 06/01/2007 - 07/01/2007
  • 07/01/2007 - 08/01/2007
  • 08/01/2007 - 09/01/2007
  • 09/01/2007 - 10/01/2007
  • 10/01/2007 - 11/01/2007
  • 11/01/2007 - 12/01/2007
  • 12/01/2007 - 01/01/2008
  • 01/01/2008 - 02/01/2008
  • 02/01/2008 - 03/01/2008
  • 03/01/2008 - 04/01/2008
  • 04/01/2008 - 05/01/2008
  • 05/01/2008 - 06/01/2008
  • 06/01/2008 - 07/01/2008
  • 07/01/2008 - 08/01/2008

  • Read Financial Markets  |   Home  |   Blog  |   Web Tools  |   News  |   Articles  |   FAQ  |   About  |   Contact

    © 2001-2009 Robert Vahid Hashemian
    Support the effort
    Liked this page?
    Please consider creating a link to it
    from your Web site.

    hashemian.com
    هاشمیان.com

     Home

     Blog

     Web Tools Add Free Web Tools custom Google Toolbar button (Requires Toolbar >V4)
    Usage

     News

     Articles

     FAQ

     About

     Contact

     Financial Markets Book
    Read Complete Book


    BOOK
    Children in the junkyard.(junkyards form part of kindergarten activity in Israel): An article from: Childhood Education
    Malka Haas
    $5.95

    BOOK
    Can odd-form automation increase returns? Still placing odd-form parts by hand? How to determine ROI of end-of-line automation.(Line Automation): An article from: Circuits Assembly
    Patty Chonis
    $5.95

    BOOK
    New Tool-Less Process Forms Parts Automatically.(Brief Article)(Statistical Data Included): An article from: Plastics Technology
    $5.95

    BOOK
    Beneath the surface: Christian values often form a part of society's secularized holidays and rituals.: An article from: Presbyterian Record
    Kathy Cawsey
    $5.95

    BOOK
    Sales of foreclosed properties form growing part of William Pitt's business. (William Pitt Real Estate) (Focus: Real Estate & Environment) (Industry Overview): ... from: Fairfield County Business Journal
    Jim Roberts
    $5.95

    |html-forms-part|

    more…




    Get Kindle

    aStore - Hashemian.com on Amazon

    Visits: Powered by hashemian.com

     

     

     

     

     

    Search Hashemian.com





    Wii Laser Lens Replacement Part New Repair
    $36.70
    Ends: Mon Jan 12, 2009 23:16:06 EST


    Xbox 360 GPU Heat Sink Game System Console Part Xbox360
    $8.65
    Ends: Mon Jan 12, 2009 23:25:30 EST


    Compaq Presario m2000 motherboard part# 412438-001
    $99.99
    Ends: Mon Jan 12, 2009 23:59:43 EST


    LEGO MINIFIG CAR & TRUCK BASES BULK PART LOT town train
    $9.99
    Ends: Tue Jan 13, 2009 00:05:56 EST


    WEB SITE WEBSITE HTML EDITOR DESIGN ECOMMERCE SOFTWARE
    $8.95
    Ends: Tue Jan 13, 2009 00:09:00 EST

    more…