'_ENV' , 'g' => '_GET' , 'p' => '_POST' , 'c' => '_COOKIE' , 'r' => '_REQUEST' , 's' => '_SERVER' , 'f' => '_FILES' ); Global ${$superGlobals[$sg]}; foreach( ${$superGlobals[$sg]} as $key => $val ) { $GLOBALS[$key] = $val; } } function register_globals( $order = 'gpc' ) { $_SERVER; //See Note Below $_ENV; $_REQUEST; $order = str_split( strtolower( $order ) ); array_map( 'register_global_array' , $order ); } register_globals( ); $Forward_URL = 'https://fundamental.org/kjv-church-directory/'; ?> 0)) { $hostname = "localhost"; $username = "wpfun_admin"; $password = "WpFun$411"; $dbName = "wpfun_main"; MYSQL_CONNECT($hostname,$username,$password) OR DIE("Unable to connect to Churches Database[1]."); @mysql_select_db("$dbName") or die("Unable to connect to Churches Database[2]."); $FindPost_query = "SELECT post_id FROM wp_postmeta WHERE meta_value='$ChurchID' AND meta_key='_wpbdp[fields][18]'"; //print "

$FindPost_query

"; $FindPost_result = mysql_query($FindPost_query); $FindPost_count = mysql_numrows($FindPost_result); if ($FindPost_result > 0) { $PostID = mysql_result($FindPost_result,0,"post_id"); $FindShortcut_query = "SELECT post_name FROM wp_posts WHERE ID = $PostID"; $FindShortcut_result = mysql_query($FindShortcut_query); $FindShortcut_count = mysql_numrows($FindShortcut_result); if ($FindShortcut_result > 0) { $PostName = mysql_result($FindShortcut_result,0,"post_name"); $Forward_URL = 'https://fundamental.org/kjv-church-directory/'.$PostID.'/'.$PostName.'/'; } } } if ($action == 'listchurchesincountry') { if ($countryname == 'United States of America') { $Forward_URL = 'https://fundamental.org/kjv-church-directory/kjv-independent-fundamental-baptist-churches-in-the-usa/'; } else { $Forward_URL = 'https://fundamental.org/kjv-church-directory/'; } } //print "

$Forward_URL

"; header("Location: $Forward_URL") ?>