Php Objective Questions with Answers for written test exams 8

Question 8
Is it possible to pass data from JavaScript to PHP?

A. Yes, but not without sending another HTTP request.

B. Yes, because PHP executes before JavaScript.

C. No, because JavaScript is server-side, and PHP is client-side.

D. No, because JavaScript executes before PHP.
Answers 8


Answer A is correct. Although your instincts might lead you to believe that you

cannot pass data from JavaScript to PHP, such a thing can be achieved with another

HTTP request. Answer B is incorrect because PHP executing before JavaScript

is not what makes this possible.This is actually the characteristic that might lead

you to believe (incorrectly) that the answer is no. Answers C and D are incorrect

because the answer is yes, but also because the explanations given are false.

  







Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---