HTML GET and POST methods

forms, get, html, php, post

Solution

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.

Problem

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?

Original source

Related problems