The action attribute defines the action to be performed when the form is submitted, which usually leads to a script that collects the information submitted and works with it. if you leave it blank, it will send it to the same file
<form action="/?originalUrl=https%3A%2F%2Friptutorial.com%2F%26quot%3Baction.php%26quot%3B%26gt%3B%253C%2Fcode">
The method attribute is used to define the HTTP method of the form which is either GET or POST.
<form action="/?originalUrl=https%3A%2F%2Friptutorial.com%2F%26quot%3Baction.php%26quot%3B%2520method%3D%26quot%3Bget%26quot%3B%26gt%3B%26lt%3Bform%2520action%3D%26quot%3Baction.php%26quot%3B%2520method%3D%26quot%3Bpost%26quot%3B%26gt%3B%253C%2Fcode">
The GET method is mostly used to get data, for example to receive a post by its ID or name, or to submit a search query. The GET method will append the form data to the URL specified in the action attribute.
www.example.com/action.php?firstname=Mickey&lastname=Mouse
The POST method is used when submitting data to a script. The POST method does not append the form data to the action URL but sends using the request body.
To submit the data from the form correctly, a name attribute name must be specified.
As an example let's send the value of the field and set its name to lastname:
<input type="text" name="lastname" value="Mouse">
<form action="/?originalUrl=https%3A%2F%2Friptutorial.com%2F%26quot%3Baction.php%26quot%3B%2520method%3D%26quot%3Bpost%26quot%3B%2520target%3D%26quot%3B_blank%26quot%3B%2520accept-charset%3D%26quot%3BUTF-8%26quot%3B%2520enctype%3D%26quot%3Bapplication%2Fx-www-form-urlencoded%26quot%3B%2520autocomplete%3D%26quot%3Boff%26quot%3B%2520novalidate%26gt%3B%26lt%3B!--%2520form%2520elements%2520--%26gt%3B%26lt%3B%2Fform%26gt%3B%253C%2Fcode">