Web application security - the fast guide 1.1 | Page 32

Chapter 2- Web Application technologies P a g e | 32
The main feature provided by HTML in addition to controlling the format of a document is Hyperlinks, the functionality that help surfer to point and click to move from document to another or inside the same document. Links are normally specified with the tag anchor < a >:
< a href =” http:// www. skcomputerco. com / index. php? name = sami”> The Home page </ a >
The tag above defines a link that specifies the resource named( index. php) and passes the parameter( name) with the value( sami). The information is sent in the HTTP header with GET method. In real applications the point and click interaction level becomes unable to fulfil the required functionality arbitrary data entry. HTML provides a special tag( Form) as a container and different types of( input) tag to allow different entry types.
< form name =” myForm” action =”” method =” POST” > User Name < input type =” text” name =” username” />< br /> User Password < input type =” password” name =” userPass” />< br /> Marital Status < input type =” checkbox” name =” isMarried” />< br /> male < input type =” radio” name =” gender” value =” male”/> Female < input type =” radio” name =” gender” value =” female” />< br /> Submit < input name =” submit” type =” submit” value =” submit”/> Reset < input name =” reset” type =” reset” /> </ form >
As illustrated in the previous example the markup code above will show the following form
On submit the following request will be sent by the client( web browser) POST / main / login. php HTTP / 1.1 Host: skcomputerco. com Content-Type: application / x-www-form-urlencoded Content-Length: nn
username = sami & userPass = samiPass & userPassConfirm = samiPass & isMarried = c hecked & gender = male & submit = submit