The form is a quite frequently used element in web development. Using it, you can register, fill in forms, leave feedback, take quizzes, and many other things. Can you work correctly with forms? Take the quiz and find out!
What's the main difference between GET and POST?
The GET method allows getting data from a form, and the POST method - fills form fields
The GET method sends all gathered information from a form as a part of URL to the script and the POST method transfers data in such a way that a site user doesn’t see the data transferred to the script
The GET method is used on PHP 4 and below and the POST method – in higher versions of PHP
Can your send files through GET?
A part of a form is depicted in the code in the picture. How do you display all values marked with checkboxes?
Is it possible to place a PHP code in one page to process a form and a HTML code?
How do you write select to choose several values?
select name="Item" multiple
For what is the header() function?
To rename headings
To change the heading of the current page
To redirect a user to a new page
What is contained in the $_FILES['file']['tmp_name'] variable?
File name set by a user
Full path to a temporaty file on a disk
Full file path on the server
When will $_FILES['file']['error'] be 0?
File was downloaded successfully
How do you get a value from the textfield field?
$_POST['textfield'] = $text;
$text = $_POST['textfield'];
$text = $textfield;
For what is the hidden field used?
To hide important data from outsiders, for example, a password
To enter data, which shouldn’t be transferred
To transfer intermediate data, which shouldn’t be changed by a user
How do you check that the button was clicked?
Can you leave the action attribute empty?
If you leave this attribute empty, a form will be sent to the current page of the site.
What data can you write in $_REQUEST?
Transferred by the REQUEST method
Transferred by both GET and POST methods
Obtained as a result of SQL requests
Is the code in the picture possible?
Yes, the code is right
No, it's impossible to use PHP inside a HTML tag
You know the subject at the initial level
You still need to know many things to write good web forms, but don't be upset: read articles and self-teaching textbooks and train, and you'll be able to create even the most complex forms! Share the quiz with friends, let them check their knowledge on web forms!
You know the subject at middle level
You can create various forms, but there are gaps in your knowledge you need to close for successful web development. Repeat the theory and solve problems, and you'll pull it off! Share the quiz with friends, let them check their knowledge on web forms!
You know the subject in perfection!
You create the most complex forms with no problems, easily process data, know all the nuances of this subject - we can congratulate you! Shift to more complex subjects, we wish you good luck on the way of learning web development! Share the quiz with friends, let them check their knowledge on web forms!