Title: Session variable unset :(
Last modified: August 18, 2016

---

# Session variable unset :(

 *  [Mads Phikamphon](https://wordpress.org/support/users/madsphi/)
 * (@madsphi)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/session-variable-unset/)
 * Argghhh, my session variable seems to unset when I change page.
 * I set the variable in [one post](http://www.kortx.dk/kort-over-mellemoesten/)
   like this:
    `<phpcode><?php $_SESSION['SubRegionId'] = '10';?></phpcode>`
 * And then I assume that I can access it in a [second post](http://www.kortx.dk/kort-over-forenede-arabiske-emirater/)
   when I click the link to it in the first post (“Kort over Forenede Arabiske Emirater”).
 * Unfortunately the session variable is gone when the second page is loaded.
 * I have checked my code several times and I have no unset of the session variable
   anywhere.
 * Any idea what is going wrong?
 * Thanks, Madsphi

The topic ‘Session variable unset :(’ is closed to new replies.

## Tags

 * [session](https://wordpress.org/support/topic-tag/session/)
 * [unset](https://wordpress.org/support/topic-tag/unset/)
 * [variable](https://wordpress.org/support/topic-tag/variable/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [Mads Phikamphon](https://wordpress.org/support/users/madsphi/)
 * Last activity: [19 years, 2 months ago](https://wordpress.org/support/topic/session-variable-unset/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
