session_start();session_unset();session_destroy();if(!empty($_GET['foo'])){ header('location:'.$_GET['foo']);}else{ header('location:algo.php');}