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

Which of the following that can be use to access session variables in PHP?

Select one:

a. $_SESSION

b. start_session()

c. session_start()

d. $_SESSIONS

Respuesta :

Branta Branta
  • 12-08-2019

Answer:

a. $_SESSION

Explanation:

A session variable in PHP can be accessed using the global variable $_SESSION.

This can be used for both setting and retrieving session values as described subsequently.

$_SESSION["var1"] = "value1";

This set a session variable called 'var1' to a value 'value1'. Later if we want to retrieve this value we can do it as follows:

echo "Value of session variable 'var1' is " . $_SESSION["var1"] ;

This will print the result: Value of session variable 'var1' is value1

Answer Link

Otras preguntas

Which renewable resource could become a non renewable resource if used faster than Earth ability to.replenish it's supply?
how many cups is 15 pints
What part of a microscope helps and adjust the brightness of an image
Can a vector have a zero magnitude of one of its components is nonzero
Describe the organization of the Constitution using the words Preamble, article, and amendment.
Who created a vast network of roads to link the empire? a. Aztec b. Maya c. Inca
what message do both the book and radio play of the war of the worlds attempt to share with their audience?
Baldwin believes that he has been influenced by all of the following sources except — a. Charles Dickens c. African American speech patterns b. the King James B
is 3/12 rational or irrational
Which factor is a component of skill related fitness
good job