Php Html Forms Handling(Engineering > Computer Science And Engineering > Php ) Questions and Answers

Question 1. When you use the $_GET variable to collect data, the data is visible to.
  1.    only you
  2.    selected few
  3.    none
  4.    everyone
Explanation:-
Answer: Option D. -> everyone

Question 2. The attack which involves the insertion of malicious code into a page frequented by other users is known as.
  1.    advanced sql injection
  2.    cross-site scripting
  3.    scripting
  4.    basic sql injection
Explanation:-
Answer: Option B. -> cross-site scripting

Question 3. Which two predefined variables are used to retrieve information from forms?
  1.    $_GET & $_POST
  2.    $GET & $POST
  3.    GET & POST
  4.    $__GET & $__POST
Explanation:-
Answer: Option A. -> $_GET & $_POST

Question 4. When you use the $_POST variable to collect data, the data is visible to.
  1.    none
  2.    selected few
  3.    everyone
  4.    only you
Explanation:-
Answer: Option D. -> only you

Question 5. Which variable is used to collect form data sent with both the GET and POST methods?
  1.    $REQUEST
  2.    $BOTH
  3.    $_REQUEST
  4.    $_BOTH
Explanation:-
Answer: Option C. -> $_REQUEST