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
3 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]3 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
Look at the following code.int x = 7;int *iptr = &amp;x;What will be displayed if you send the expression *iptr to cout ? What h
masha68 [24]

Answer:

The answer to the given question can be given as:

The value of *iptr is 7. and the value of iptr is dynamic.

Explanation:

In the c++ code, it is defined that x is an integer variable that assigns a value which is 7. Then we define a pointer variable that is *iptr. This variable holds an address of the x variable. When we print the value of the iptr variable. if we use the expression *iptr to print value of the pointer variable by cout that is used in c++ for pint values. so the value of the iptr is 7. If we use the expression iptr sent to cout so we show the address of the variable x. In the pointer, it manages the addresses of dynamically allocated so the address of the variable is changed on execution time.

4 0
3 years ago
How can information technology transform the way business processes in an organization
timurjin [86]

Answer:

1. Through cooperation.

2. Understanding the market and the organization.

Explanation:

Information Technology can transform the way business processes in an organization only if there is cooperation in the company. The cooperation is that everyone is to agree on the change that it is going to cause.

An information Technologist can change the way business process if he or her understand the maker of the company and the company.

The major point is this:

1. The company must cooperate.

2. Everybody must accept change for it to grow higher.

3. Understand the market of the company and

4. understand the company and how they operate and then change and replace the parts that need replacement.

6 0
3 years ago
Write a paper of at least 300 words that includes:
Marina86 [1]

Answer:Let’s start with a review of the essential steps in the career planning process.

Career Planning

Shepard and Mani define career planning “as an ongoing process through which an individual sets career goals and identifies the means to achieve them” (2013, p. 14). It is through career planning that a person evaluates abilities and interests, assesses values and personality, considers alternative career opportunities, establishes career goals, and plans practical developmental activities.

Career planning requires individuals to understand themselves and their values, interests, and skills. It is also an ongoing process, one that must be repeated with changes in employment and life circumstances. As you gain more experience and knowledge, the process will begin anew.

This section reviews the five essential steps of career planning, which are based on our research and input from industry experts:

Conduct a self-assessment

Research the labour market

Create your career search toolkit

Put your career campaign into action

Engage in networking

Let’s start at step one.

Step One: Conduct a Self-Assessment

Self knowledge is the key to choosing a career. It can be overwhelming to begin the process of self-assessment. However, if done well at the start, the likelihood of securing work that has meaning, purpose, and fulfillment is far greater. Understanding your preferences, knowing your strengths, and honestly facing the areas you need to develop are the first steps for effective self-assessment.

Explanation:

7 0
3 years ago
Which of the following is NOT a cost typically associated with owning a car?
Arturiano [62]
A. fuel ; when you but a car you aren't buying the gas to go in it 
3 0
3 years ago
When do you use a for loop?
AleksandrR [38]

Answer:

You use a for loop when you know how many times you want to run the loop

Explanation:

if you dont know, use a while loop

6 0
2 years ago
Read 2 more answers
Other questions:
  • What is the formula equivalent to the function =SUM(B1:B5)?
    11·2 answers
  • b. Suppose instead that Miller had written a routine to constantly change his assigned IP address to other addresses used by his
    8·1 answer
  • Make a hierarchical directory structure under /root that consists of one directory containing three subdirectories.
    8·1 answer
  • Individuals with desirable traits will be __________ to have young that survive than individuals without these traits. (2 points
    5·2 answers
  • Design a class that has an array of floating-point numbers. The constructor should accept an integer argument and dynamically al
    7·1 answer
  • Vendors who use open source as part of their product offerings can expect to bring new products to the market faster because: Gr
    11·1 answer
  • Based on the module,
    9·1 answer
  • In our discussion of Computer Hardware, we talked about three essential hardware components that are there inside every computer
    14·1 answer
  • Can you exclude header rows from sort in excel?
    8·1 answer
  • What is the difference between a status bar, title bar, and tabs?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!