Is it necessarily required that the action="abc.php"
in FORM tag must have a PHP, JSP, ASP file? Can't simple HTML code display the data submitted in the FORM
?
In other words,
FILE: abc.html
<form method="post" action="xyz.html">
<input type="text" name="name" id="name" value="Enter your name here" />
</form>
OR
<form method="get" action="xyz.html">
<input type="text" name="name" id="name" value="Enter your name here" />
</form>
Now in file xyz.html
, can I display the name entered in abc.html using only HTML code?
Both GET and POST method is used to transfer data from client to server in HTTP protocol but Main difference between POST and GET method is that GET carries request parameter appended in URL string while POST carries request parameter in message body which makes it more secure way of transferring data from client to ...
HTTP POST requests supply additional data from the client (browser) to the server in the message body. In contrast, GET requests include all required data in the URL.
A method="post" attribute value specifies that the form data will be sent to the server by storing it in an HTTP request body. This method is used to transfer data securely using HTTP headers.
HTML by itself can't access submitted POST/GET data. You need a server side language (PHP, python, ruby, .NET, ...) to put those values into HTML.
That being said, you can post to a HTML page, you just won't be able to do anything with it.
You could use JavaScript to access GET variables, but not POST.
You cannot dispaly it using html only. You need to have a server side scripting language like PHP,ASP.Net or java etc...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With