How to create HTML form that accept user name and display it using PHP ?
Through HTML forms various data can be collected from the user and can be sent directly to the server through PHP scripting. There are basically two methods for sending data to the server one is “GET” and the other one is “POST”.
In GET method, the data goes through the browser’s URL and can be seen by anyone using the browser, and it is not very safe when sending crucial or highly confidential data. But with the POST method, the data is directly sent to the server, and it can’t be seen by anyone, and it is considered the most secure way to send the information to the server.
Generally, the GET method is used by the search engines because it reads the data but for the data to be maintained or changed, the POST method is used for it.
Approach: We will see one example of the HTML form collecting the first and last name of the person and sending the data to the DOM which eventually displays the data on the screen using PHP script.
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.