In PHP forms, you can make a field required by using the required attribute in the HTML.
- TRUE
- FALSE
The statement is true. In PHP forms, you can make a field required by using the required attribute in the HTML. The required attribute is an HTML attribute introduced in HTML5 that can be added to form fields. When this attribute is included, the browser ensures that the field must be filled out by the user before the form can be submitted. The required attribute provides a client-side validation mechanism to enforce the field's requirement. While PHP can also perform server-side validation, the required attribute is an additional layer of validation provided by the HTML form itself. Learn more: https://www.w3schools.com/tags/att_input_required.asp
Loading...
Related Quiz
- What is the purpose of the array_reverse() function in PHP?
- You should use the move_uploaded_file() function in PHP to move the uploaded file to a desired directory.
- What are the differences between an interface and a class in PHP?
- In PHP, you can include a file using the include or require statement, which takes the path to the file as the ______.
- Which cryptographic extension provides generation and verification of digital signatures?