Designing and Coding Web Forms
label
’sfor
links to theid
of theinput
- You can put the
input
inside thelabel
and that’ll achieve the same thing in a cleaner way name
is so that it exists in the DOM- In PHP, you can access posted data with
$_POST
, where you use thename
you used in the input field to reference the data - Showing errors is simple, you can add a css class to the element if there is an error