Topic : HTML FORM SUBMIT BUTTON
Part - 4
The another part which is important to covered that is Submit button. If you are following all the previous parts of the tutorial then our Html form has covered the action and method attribute. So, here we are going to implement these attributes into our form, in which user has entered the information into a text box.
The Action attribute will ask you to where the information is need to be sent and the Method attribute will ask in which it should be sent to the other page.
The Submit button in Html is used to submit form data to the page mentioned in the ACTION attribute. Let's see the example below:
<form action="basic_form.php" method="post">
So, the action indicates the information retrieve on the same page that is basic_form.php . To submit the information inputted by the user we just need a Html Submit button.
<input type="submit" name="submit" value="Submit" />
Instead of using submit in input type, we can also use button image but at the moment we don't need to do anything special with a submit button. All the work has done automatically till the Submit has an action set, it means your data is going to sent somewhere in the project.
However, if you noticed that we used name attribute in the input type. This Name attributes of the submit buttons comes very handy at the time when you want to check if the form was really submitted or not. We have given name to our submit button as submit and you can give anything you like.
This attribute or feature is very important when we use PHP Script on the same Html form. This is the end of Part 4 of this tutorial and we already learned about Method, Action and Submit of Html Form.
In the next part, we will learn how to get values from the text box in the Html form.
Recommend the tutorial