Basics of Working with Forms in PHP
We can receive data from the website user
using forms. Forms are created
using the form tag,
input tags,
and submit buttons:
<form>
<input>
<input>
<input type="submit">
</form>
For each form element whose data we
want to receive in the PHP script, we must give
it a name using the name attribute:
<form>
<input name="test1">
<input name="test2">
<input type="submit">
</form>
Using the action attribute, we specify
the file to which the form will be sent:
<form action="/result.php">
<input name="test1">
<input name="test2">
<input type="submit">
</form>
Create a form with three inputs where you can enter the user's name, age, and salary.