Wednesday, March 19, 2014

If you set a cookie with either setcookie() or header(), you can immediately check to see whether the client accepted it.

A. True, you can check the $_COOKIE superglobal array to see if it contains the

value you set.

B. True, but only if register_globals is enabled.

C. False, you can only use setcookie() if you need to test for acceptance.

Using header() does not work.

D. False, you must wait until you receive another HTTP request to determine

whether it includes the Cookie header.


Answer D is correct.The response that contains the Set-Cookie header is not sent

No comments:

Post a Comment