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
The communication channel used in IMC must rev: 12_06_2018_QC_ CDR-223 Multiple Choice match the traditional channel used in tha
Setler [38]

Answer:

connect the sender with the desired recipients.

Explanation:

Integrated Marketing Communication (IMC) is a process through which organizations create seamless branding and coordination of their marketing and communication objectives with its business goals and target audience or consumers. The communication tools used in IMC are both digital and traditional media such as billboards, search engine optimization, magazines, television, blog, radio, webinars etc.

The communication channel used in IMC must connect the sender with the desired recipients.

The receiver is any individual who is able to read, hear or see and process the message being sent or communicated in the IMC communication process. Any interference the IMC communication process is known as noise.

An organization can analyze and measure the effectiveness of the IMC communication process by considering market share, sales, and customer loyalty.

5 0
3 years ago
You would like to conduct a survey and ask your web page visitors to indicate the computer operating systems that they use. Each
Rudiy27

Answer:

<em>A. check box </em>

Explanation:

A check box, selection box, or tick box <em>is a small immersive box that the user can switch to demonstrate an affirmative or negative choice</em>.

It is often observed in applications and operating systems ' HTML input forms, dialog boxes, and GUIs.

A check mark appears inside the box when clicked to signify an affirmative (yes) option. The check mark will vanish when clicking again, suggesting a negative option (no).

6 0
3 years ago
Just took a test and I got 5 wrong and I wanted to know the correct answers
baherus [9]

Answer:

I need the pic

Explanation:

7 0
2 years ago
A company with a large number of hosts creates three subdomains under a main domain. For easier management of the host records,
REY [17]

Answer:

4

Explanation:

For easier management of the host records of the company 4 zones should be used because

subdomain is part of a larger domain and the main domain which is the primary domain is the name which the company have decide to use which will represent the company website address and in a situation where the company

have different domain names in which they had registered, they will need to choose one among the domain which will inturn be their main domain.

Therefore for easier , efficient and effective management of the host records 4 zones will be the best zones to be used.

Example of sub domain is north.example.com

4 0
3 years ago
A DSS8440 server is equipped with one power supply that is failing and requires replacement. What is the correct sequence of ste
Alisiya [41]

Answer:

ICICI oxidized sicken o'clock o'clock succinct

6 0
2 years ago
Other questions:
  • When you add an rss feed to hootsuite publisher, posts from blogs and websites you designate will be?
    5·1 answer
  • Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both doubles) as input, and output the g
    7·2 answers
  • Which zone of the ocean is deepest ?
    7·2 answers
  • What is the decimal value of 00001111
    14·1 answer
  • Many Web browsers allow users to open anonymous windows. During a browsing session in an anonymous window, the browser does not
    8·1 answer
  • Define a function pyramid_volume with parameters base_length, base_width, and pyramid_height, that returns the volume of a pyram
    6·2 answers
  • What game is this?????????????????????
    15·1 answer
  • Use the drop-down menus to complete each sentence.
    8·2 answers
  • Professional communication must be objective,
    8·1 answer
  • ____ the most popular word processing applications software<br><br>​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!