PHP MySql: Creating a form in HTML

PHP MySql tutorial: part 1

After go through PHP MySql, let's create a form to make our database look better. We will try to create a database using PHP MySql. In which, we can insert some data. It can be student information system.The form will looks like bellow:


Let's create the form which is not really useful for the first time.
I have consider that you know the basic tags of HTML.
Let's do some HTML code then I will explain:



let me explain something. Here we have use some tag in our code.
We have use:
# 1 : <form> ---- </form>  to create a form
# 2 : name = "form" to define name, it could be anything, but it must be similar to the name of the database. For example, if the name of the database is "studentInfo", then the name="studentInfo" is alright.
# 3 : action = "index.php" action is the next task to do.
# 4 : method="POST" mean that, the form data will be posted into the database.
There is two method. One to GET method and another is POST. Get is use to get something and post is use to posting something in a common sense.
# 5 : Then <fieldset> --- </fieldset> use to create a separate field. The <input> --- </input> use to perform the action. We use type as submit which will create a submit button and pass the value to the database.
I hope this article is understandable to learn the first step of PHP MySql. Follow the full tutorial series to learn PHP MySql database.

Related post:

HTML Bangla pdf e-Book                                               CSS Bangla e-book

Next tutorial ( what is XAMPP and Install XAMPP in computer) coming soon...
If you have any question or suggestion this post( PHP MySql: Creating a form in HTML) , please comment bellow.

0/Post a Comment/Comments