Originally posted by foolish
session_start();
$user = "name";
session_register("user");
but i can not destroy the session variable when i do as following:
session_unregister("name");
session_destroy();
It looks like your syntax is a little odd. Try this:
session_start();
session_register($user); //notice the "$" in front of "user", also, no quotes on the variable because it is holding a double-quoted string already
session_unregister($user); //using "name" here is incorrect, I think. You want to maintain consistency, e.g., if you use $user to register the session, you should use $user to unregister it.
session_destroy();
I hope this helps!