ikthemon6901 ikthemon6901
  • 07-08-2019
  • Computers and Technology
contestada

Which of the following that can be use read cookies in PHP?

Select one:

a. $_COOKIE

b. $_COOKIES

c. setcookie()

d. cookie()

Respuesta :

Branta Branta
  • 12-08-2019

Answer:

a. $_COOKIE

Explanation:

$_COOKIE represents an associative array of Cookie name and value in PHP. For example in the code below we use the $_COOKIE construct to read the value of a cookie called 'testcookie' provided it has already been set.

<html>

<body>

<?php

if(!isset($_COOKIE["testcookie"])) {

   echo "Cookie 'testcookie' is not defined!";

} else {

   echo "Value of 'testcookie' is: " . $_COOKIE["testcookie"];

}

?>

</body>

</html>

Answer Link

Otras preguntas

What does the adverbial clause bolded in the sentence below modify? Justin's mom thought teaching him how to cook was important so that he would be more indepen
Eva can type 320 words in 4 minutes. How many words per minute can Eva type?words per minute​
Help me please I’ll give you brainliest be honest because if not I’m gonna fail the yearrr pleaseee help
Where do insurance companies get the money to pay for losses suffered by their customers?
Why did Black People support the Republican Party?
Rainbows are formed because all colors of light bend the same amount when they enter a medium. True False
HELP MEEEEEEEEEEEEEEEEE
Which of the following is true of money?
The teen shop stores sweaters in boxes there are 2 sweaters in the first box 4 sweaters in the second box 6 sweaters in the third box and 8 sweaters in the four
46+9a=-5a+74 solve for a