1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
jeka94
2 years ago
6

What code do I have to use in my php if i don’t want my $_SESSION[“variablex”] to destroy? But i already have a session_destroy(

) above the code that needs to be there. Or maybe there is an alternative?
So i want to destroy all my sessions EXCEPT $_SESSION[“variablex”]
Computers and Technology
1 answer:
Vesnalui [34]2 years ago
5 0

Answer:

See Explanation Below

Explanation:

Follow the steps below.

1. Start Session

2. Assign the session you want to preserve ( $_SESSION['variablex'] ) to a variable

3. Destroy all session (including the one you want, $_SESSION['variablex'])

4. Reassign the contents of the variable you created in (1) above to $_SESSION['variablex'].

The code is as follows (comments explain each line)

<?php

session_start(); // Start session

$variable = $_SESSION['variablex'] ; // assign $_SESSION['variablex'] to $variable

session_destroy(); // Destroy sessions

$_SESSION['variablex'] = $variable; // assign $variable back to $_SESSION['variablex'] to

// You can continue your code (if you have any), here

// End of solution

?>

You might be interested in
How many levels of heading tags are allowed in html?
nirvana33 [79]

Answer:

six levels

Explanation:

HTML defines six levels of headings. A heading element implies all the font changes, paragraph breaks before and after, and any white space necessary to render the heading. The heading elements are H1, H2, H3, H4, H5, and H6 with H1 being the highest (or most important) level and H6 the least.

5 0
2 years ago
Read 2 more answers
. When you ____________________ a word, you can use a single line, a double lines, a dotted line, or even a wavy line!
Serhud [2]
Answe
That is the answer just had that
7 0
1 year ago
What do developers do to support software products? explain to users which development process model was used to make the produc
cestrela7 [59]

Answer:

The developer develops the user manuals to support their products. And agile development process is being used to make the user manual. The technical write this, but they first talk to developers, designers, project managers, team leaders etc. and collect all the information from them. And they start making them since start of the project. They use jira, git and various version control to update this document. And all the functionalities must be mentioned accurately, as well as latest of them to ensure reliability and credibility. Devops is another automated technology being used extensively these days.

Explanation:

The answer is self explanatory.

8 0
3 years ago
At what x position are the ellipses drawn??? thanks ♡​
Anna71 [15]

Answer:

55

Explanation:

The xPos variable is set to 55 and they have set the variable in the code for the ellipses in the x position

Hope this helps

7 0
2 years ago
Cloud resources are​ ________ because many different organizations use the same physical hardware.
Lady bird [3.3K]
<span>Cloud resources are​ pooled because many different organizations use the same physical hardware. they share that hardware through virtualization. The elastic leasing of pooled computer resources over the internet. There are four types of clouds. The types of clouds can be categorized by their altitude or by how they have formed. Different categories include low level, mid level, and high level. There is also a category for those that have developed vertically.</span>
7 0
3 years ago
Other questions:
  • Consider a movie database in which data is recorded about the movie industry. the data requirements are summarized as follows:
    15·1 answer
  • Is it safe to take apart a computer monitor?
    13·1 answer
  • An element in an array is 4 bytes long and there are 10 elements in the array. How big is the array?
    6·2 answers
  • Identify which statement explains why a programmer would break a logic problem into steps.
    13·2 answers
  • You’re having trouble connecting to the Internet so you call your Internet service provider for help. They need to know the perm
    15·1 answer
  • Electronic mail is a
    9·1 answer
  • How does a programmer use digital waves to transfer sound?
    11·1 answer
  • Help me and i'll mark brainliest
    9·1 answer
  • Prior to the 1996 NEC, ____ receptacles and cords were permitted. However, now it is mandatory that a separate equipment groundi
    11·1 answer
  • What are three ways of verifying legitimate right of access to a computer system?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!