Undefined index: logout in F:\xampp\htdocs\xxx\index.php on line 6 This is the index.
<?php
session_start();
date_default_timezone_set('Europe/Paris');
// LOGOUT
if($_GET['logout']==1).
Undefined index: logout in F:\xampp\htdocs\xxx\index.php on line 6 This is the index.
<?php
session_start();
date_default_timezone_set('Europe/Paris');
// LOGOUT
if($_GET['logout']==1).
i suggestion to you, first create a function ex:
<?php
function get_request($name, $default = ''){
if(isset($_REQUEST[$name])){
if($_REQUEST[$name] != ''){
return $_REQUEST[$name];
}else{
return $default
}
}else{
return $default
}
}
?>
Now! you can use
<?php
session_start();
date_default_timezone_set('Europe/Paris');
// LOGOUT
if(get_request('logout', 0) == 1)
or for simple use, you can write:
// LOGOUT
if(isset($_GET['logout']) && $_GET['logout'] == 1)
regards :-)