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
  • 08/01/2008 - 09/01/2008
  • 09/01/2008 - 10/01/2008
  • 10/01/2008 - 11/01/2008
  • 11/01/2008 - 12/01/2008
  • 12/01/2008 - 01/01/2009
  • 01/01/2009 - 02/01/2009
  • 02/01/2009 - 03/01/2009
  • 03/01/2009 - 04/01/2009
  • 04/01/2009 - 05/01/2009
  • 05/01/2009 - 06/01/2009
  • 06/01/2009 - 07/01/2009
  • 07/01/2009 - 08/01/2009
  • 08/01/2009 - 09/01/2009

  • 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
    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
    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
    Tailoring your roast to the bean: in the pursuit of "deliciousness," craft roasting has become an art form. Part experience, part science and part experimentation, ... An article from: Tea & Coffee Trade Journal
    Phil Beattie
    $9.95

    |html-forms-part|

    more…




    Get Kindle, $259

    aStore - Hashemian.com on Amazon

    Visits: Powered by hashemian.com

     

     

     

     

     

    Search Hashemian.com





    KRIKEY RACE CAR SEAT CIRCLE TRACK RACE CAR PART IMCA
    $99.00
    Ends: Wed Nov 25, 2009 23:35:41 EST


    Guitar Part - Rosewood Armrest (129)
    $6.90
    Ends: Wed Nov 25, 2009 23:36:52 EST


    Large Tour Pack Trunk HARLEY-DAVIDSON part FLH dresser
    $60.00
    Ends: Wed Nov 25, 2009 23:37:13 EST


    HUGH PRIMITIVE 2 PART BASKET HAND PAINTED DECORATIVE
    $19.00
    Ends: Wed Nov 25, 2009 23:41:39 EST


    Guitar Part - Rosewood Pickguard w/ MOP Art Inlay (582)
    $7.90
    Ends: Wed Nov 25, 2009 23:43:47 EST

    more…