The button in the context of a form. The ‘submit’ button for a form.
When the ‘submit’ button is actually clicked in the HTML document in the browser by the users mouse cursor, it sends the collected ‘form’ data from the text ‘input’ fields - the’ email’ and ‘password’ - to a web server. On the web server is a predefined (programmed by the coder beforehand) database that has a predefined table with rows. The rows each have a field for a data type (i,e,. integer, varchar, Boolean, etc.,) which holds a value. The values in my example are ‘email’ and ‘password’. Both text entries. When your form asks for a ‘email’ and a ‘password’; the table has a place to store and hold these values for recall later. There are several ways to build out the ‘button’ element. Below the ‘button’ element is outside the ‘form’ element but is connected by the ‘form’ attribute in the button element. For the button element => [ form =“myForm” ]. For the form element => [ id=“myForm” ] The “myForm” value links in the form element to the button element.
<form action="login.php" method="POST" id="myForm" >
<input type="email" placeholder="Enter your email" name="email" >
<input type="password" placeholder="and password" name="password" >
<input type="submit">
</form>
<button type="submit" form="myForm" value="Submit">Submit</button>