I have a PHP file that is sometimes called from a page that has started a session and sometimes from a page that doesn\'t have session started. Therefore when I have s
Not sure about efficiency of such solution, but this is from working project This is also used if you need to define the default language
/**
* Start session
* Fall back to ukrainian language
*/
function valid_session() {
if(session_id()=='') {
session_start();
$_SESSION['lang']='uk';
$_SESSION['lang_id']=3;
}
return true;
}