i have this file
secure.php
session_start();
if(empty($_SESSION[\'u_name\'])) {
header(\"Location:emprego.php\");
}
if(isset($_GET[\'logout\'])) {
I recently found header_remove();
http://php.net/manual/en/function.header-remove.php
Caution: This function will remove all headers set by PHP, including cookies, session and the X-Powered-By headers.
Not sure whether this is the appropriate way to do it, but it's pretty effective for log out functionality.