Anyone able to assist on fixing this one annoying error been trying for like 30minutes.
<?php
if(isset($_POST['statusBtn']))
{
$username = htmlspecialchars($_POST['address']);
strtolower($username);
if(empty($username))
{
echo '<center><div class="alert alert-icon alert-danger alert-dismissible fade in col-md-7" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span></button><i class="mdi mdi-check-all"></i>Fill in all fields</div></center>';
} else if($username == "" || $username == ""){
echo '<center><div class="alert alert-icon alert-danger alert-dismissible fade in col-md-7" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button><i class="mdi mdi-check-all"></i>Domain Whitelisted</div></center>';
} else {
$geo = @file_get_contents("http://ip-api.com/json/{$username}");
$json_a = json_decode($geo, true);
$proxyid = $json_a['status'];
if($proxyid == success)
{
echo '<center><div class="alert alert-icon alert-success alert-dismissible fade in col-md-7" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button><i class="mdi mdi-check-all"></i>'.htmlspecialchars($username).' is Online!</div></center>';
} else {
echo '<center><div class="alert alert-icon alert-danger alert-dismissible fade in col-md-7" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button><i class="mdi mdi-check-all"></i>'.htmlspecialchars($username).' is Offline!</div></center>';
}
}
}
?>
When I submit for example google.com in form it echo's the result along with error
Notice: Use of undefined constant success - assumed 'success'