Solution:

Use isset 🙂

if(isset($_GET[‘do’]) && $_GET[‘do’] ==”signoff”)
{
session_destroy();
$msg=”Successfully Signed off”;
}