Sunday, October 5, 2014

2.1 Parts of Html Form

In this section, we will discuss about the basic parts of the form. Though I know the you already familiar with this when you study about html. Now its about time to put this form it to action!

A form is basically a container for your html variables like inputbox, button, radio, checkbox and so on. And form can also contain some attributes like action and method. There are lots of a form can use but for the sake of this tutorial we will just tackle only these two attributes since it is commonly used most of the time especially in server side scripting

Ok, lets move on to the parts of the form

1) Action - this refers to the location of the page once the is submitted

2) Method - this refers to the type of how the data will be handle by the server. We will discuss more about it later

3) Html variables - in this case, we used the text, password and submit variables. Each variable has their own specific functionality. Like for example the input text, which handles text or string that will be submitted by the form

As you  notice in the above illustration, these variables can contain also some attributes which are necessary to perform such specific task

Basic are attributes are:

type - this determines the type of the variable to be used.

name - this will be the reference used by the server side scripting language (in our case PHP) once the form is submitted.

There are lots of attribute that html variable can have, but those two are the necessary attribute in order for us to move on.

In the next lesson, we will discuss some PHP global variables such as $_GET, $_POST, $_REQUEST and how it is used in server side scripting in terms of data handling.

Ok, simple enough, now lets see our form in action!


  1. […] Pre-requisites 2. Global Variables 2.1 Parts of Html Form 2.2 $_GET 2.3 $_POST 2.4 $_REQUEST 3. Single 3.1 insert.php 3.2 select.php 3.3 update.php 3.4 […]

  2. […] << Parts of Html Form |TOC| $_POST>> […]


Note: Only a member of this blog may post a comment.