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

A vase sits on a shelf. what form of energy does it possess?
If you know the equation of a proportional relationship,how can you draw the graph of the equation
What is the absolute value of -|21|
Why is Tutankhamun’s tomb, the most complete pharaoh’s tomb discovered, such a significant discovery?
The only written legal code to survive from the Ancient World comes from A. Giza B. Nimrud C. Knossos D. Babylon
What is thie solution to the equation-(5-(a + 1)= 9-(5-(2a-3)?
Nicole and her grandmother live in the same neighborhood, but a forest of trees separate their houses. If you left Nicole’s house and you drove three miles West
v = r + at, solve for a
Only a small amount of atp is produced during glycolysis because most of the energy stored in a glucose molecule remains in the bonds of:
Earthquakes that originate beneath the ocean floor produce huge tidal waves called _____.