getLanguage(); //go back to the index page. if (Helpers::check_if_game_client()) { header( 'Location: '. $INGAME_WEBPATH ); }else{ header( 'Location: '. $WEBPATH ); } exit; }else{ //handle login failure $result = Array(); $result['login_error'] = 'TRUE'; $result['no_visible_elements'] = 'TRUE'; helpers :: loadtemplate( 'login', $result); exit; } }catch (PDOException $e) { //go to error page or something, because can't access website db print_r($e); exit; } }