HTML Web Forms

As previously mentioned, there are two main methods by which you can interact with an online application running within your browser: click a link or submit a form. Clicking a link can request a page from the Web server, and if the application developer included data in a query string, clicking the link also sends […]

Submit Buttons and Reset Buttons

Submit buttons have been used copiously throughout this chapter, so there’s no need for an example that demonstrates how they work. However, there are a couple of points to note. First, what happens if you need more than one submit button in a form? In this case you will have to set the name and value attributes of the […]

HTML Form Fields Controls and PHP

With an understanding of the process under your belt, you’re ready to look at the most common HTML form field controls you can use to collect information in a form, and see how you can use PHP to get at this information afterward. By the way, you can use the terms form field, control, and form element interchangeably; they […]

List Boxes

List boxes or drop-down list boxes are controls that typically display several items in a list. Sometimes they have an arrow next to them that enable the user to scroll down to additional items. They work a little different in HTML because they’re created with two elements: <select> and <option>. Essentially, they provide the same functionality as the […]

Password Fields

Passwords are essentially text fields that blank out the input with asterisks when the user types in text. They store and transmit information in the same way as text fields: What is your password? <input name=”Password” type=”password”> There’s no difference in the processing between text and password types of text fields, so no example is […]

Multiple Check Boxes

What happens if you want to use more than one check box? If you’re familiar with radio buttons, you know that selecting one radio button in a group of radio buttons automatically moves the choice from whatever button was selected before to your current selection. Check boxes don’t work like that, and their advantage is […]


What happens when you submit a form in HTML? The user fills out the various text boxes and clicks a Submit button when ready; the information that is supplied is then bundled up in one of the two ways and sent to the Web server. The Web server can then pull out this information, and […]

Check Boxes

A check box is another control that, like a text field, is created in HTML using the <input> element. It provides a single box that can be ticked or not, depending on the option chosen. It doesn’t require any data from the user, other than a click in the check box, so any data this control contains is […]

URL Encoding

There is a set of characters that can’t appear in a URL, and therefore by association, can’t appear in a query string either, so they have to be URL encoded. The encoding process requires you, the user or developer, to do precisely nothing. It’s all done for you. The Web browser takes the offending character, […]

Attributes of the Element

The <form> element has a whole host of attributes, but you can get by using only two of them, action and method. Other attributes, such as id, class, dir, lang, language, name, style, and title are universal to most or all HTML tags, and shouldn’t need further explanation. The more obscure attributes accept-char and enctype, which specify the character sets and the mime-type of the form data are outside the scope of […]