Yes I am trying to unset this session variable session_unset($_SESSION['ordercompleted']); only, but it unsets everything. Why does this happen for?
It's because that function ('session_unset') doesn't take any parameters, its purpose is to unset all session variables. Instead use unset($_SESSION['ordercompleted']) Code (markup): or $_SESSION['ordercompleted'] = null Code (markup): (or however you want it).
Just FYI: If you are not sure how something works, check the manual on php.net http://at2.php.net/manual/en/index.php Code (markup):