Marine OSO information

< ?PHP $DBhost = "mysql.officerofmarines.com"; $DBuser = "yukon180"; $DBpass = "mnm4ever"; $DBName = "marines"; mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable to connect to database"); @mysql_select_db("$DBName") or die("Unable to select database $DBName"); $getcity = $_GET['city']; $getcity = str_replace("_", " ", $getcity); $sql = "SELECT * FROM oso_table WHERE city = \"$getcity\""; $result = mysql_query($sql); $numberofrows = mysql_numrows($result); $i = 0; if ($numberofrows < 1) { if ($getcity == "durham"){ print "The Durham, NH Marine Corps OSO has permanently moved to Portsmouth, NH. You can find their information at the Portsmouth OSO page.”;
}
if ($getcity == “albuquerque”){
print “The Albuquerque, NM Marine Corps OSO has permanently closed. Please use
Phoenix, AZ, Tucson, AZ, or Lubbock, TX instead.”;
}
} else {
while ($numberofrows > $i) {
$_id = mysql_result($result,$i,”id”);
$_district = mysql_result($result,$i,”district”);
$_hq = mysql_result($result,$i,”hq”);
$_address = mysql_result($result,$i,”address”);
$_city = mysql_result($result,$i,”city”);
$_state = mysql_result($result,$i,”state”);
$_zip = mysql_result($result,$i,”zip”);
$_phone = mysql_result($result,$i,”phone”);
$_url = mysql_result($result,$i,”url”);

$showcity = $_city;
$showcity = strtolower($showcity);
$showcity = str_replace(” “, “_”, $showcity);
$showcity = str_replace(“(“, “_”, $showcity);
$showcity = str_replace(“)”, “_”, $showcity);
$showcity = str_replace(“__”, “_”, $showcity);
$showcity = str_replace(“_.”, “.”, $showcity);

$shortaddress = substr($_address, 0, strpos($_address, “,”));

if ($shortaddress == “”){
$shortaddress = $_address;
}

$mapaddress = $shortaddress . ” ” . $_city . ” ” . $_state;
$mapaddress = str_replace(” “, “+”, $mapaddress);

print ““.$_city.” OSO“;
print “

The “.$_city.” OSO is located at “.$_address.” (view on Google Maps). You can call the office at “.$_phone.”. “;

if ($_url !== “”){
print “You can also visit the “.$_city.” OSO online at “.$_url.”.

“;
} else {
print “As far as I know, the “.$_city.” OSO does not have a website.”;
}
$i++;
}
}
?>

After finding your local Marine OSO, learn how to apply for commissioning or prepare yourself physically for Marine OCS.

If any of the above information is incorrect, please contact me.

« Return to the Marine OSO list