Every time I run this code, only "Not from a" gets written, whether the location is "a" or not.
function logsIn($dir, $account, $balance) {
$d = date("D F d Y - h:i A");
$file = fopen("logs/$dir.txt", "a");
if ($_SESSION['pass'] == "123") {
if ($api["Location"] != "a")
fwrite($file, "<span style='color:#FF0000;text-align:center';>Not from a.</span>");
else
fwrite($file, "From a.");
}
locationis "a" orLocationis "a"?$_SESSION.