Skip to content

Instantly share code, notes, and snippets.

@nurullahisik
Last active February 12, 2019 12:43
Show Gist options
  • Save nurullahisik/007120ec991f0441869155563f87a1a0 to your computer and use it in GitHub Desktop.
Save nurullahisik/007120ec991f0441869155563f87a1a0 to your computer and use it in GitHub Desktop.
Session Reset
<?php
session_start();
$_SESSION["A"] = "Some New Value"; // set new value
print_r($_SESSION);
$_SESSION["B"] = "Some New Value"; // set new value
$_SESSION["C"] = "Some New Value"; // set new value
print_r($_SESSION);
session_reset(); // old session value restored
print_r($_SESSION);
//Output: Some Value
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment