getLanguage(); $GETString = ""; foreach($_GET as $key => $value){ $GETString = $GETString . $key . '=' . $value . "&"; } if($GETString != ""){ $GETString = '?'.$GETString; } //go back to the index page. if (Helpers::check_if_game_client()) { header( 'Location: '. $INGAME_WEBPATH . $GETString); }else{ header( 'Location: '. $WEBPATH . $GETString); } 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; } }