Topic : HTML FORM
Part - 1
Let's start with Html Form :
If you have little bit knowledge about Html, then you can understand that form tags are used to take information of the users. A form tag includes number of fields such as text boxes, radio buttons, check boxes, drop down lists, text areas, and submit buttons. We will try to cover all these fields in our form.
Let's take a look in basic Html Form called Login Page :
<form action="dislay.php" method="post">
<input type="text" name="userid" value="" size="30" /><br/><br/>
Password :<input type="password" name="pass" value="" size="30" /><br/><br/> <input type="submit" name="submit" value="Submit" />
If you noticed that above code is indicating about Html Form. It starts with <html> ends with </html> and in between html tags we used <head> and <body> tags. In the head tag we mentioned the title called Login Page in between <title> tags.
The main part of the Html form starts from the Body tag. In the <body> tag we have taken <form> tag and within form tag <input> tags. So, create the form above. Save your form called basic_form.php. Start your server, and make sure the form loads ok in your browser. You should be able to see a text box, password text box and a Submit button.
Now, come to the point, why we make this form?. This form is used to know that how many users you have and their information. Let's take an example : If any user visit to your site and wants to login, then you will need to get his detail through textboxes. After getting the detail that the user provided then you can tested through your database.
In the next part, we will discuss about method used in form.
Posted on: January 29, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles