Forms are fundamental xhen creating dynamic web pages since they allow the user to interact with the site and to send data. Here is an example of a form with buttons, fields and drop-down lists:
Tag <form> </form>
defines the begining and endding of an HTML form.
This tag accepts two main attributes:
action
defines the URL of the script that will process the formmethod
determines how data will be sent from the client to the serverHere is an example of HTML form:
<form action="processin.php" method="post">
Enter your name :
<input type="text" name="name">
<input type="submit" value="Send">
</form>
here is a simple PHP script that displays the received data:
<?php
var_dump($_POST);
Modify the previous script to add a new input field as on the following illustration: