Friday, February 9, 2018

php - Notice: Use of undefined constant success - assumed 'success'

Anyone able to assist on fixing this one annoying error been trying for like 30minutes.



if(isset($_POST['statusBtn']))
{
$username = htmlspecialchars($_POST['address']);
strtolower($username);

if(empty($username))
{
echo '
';
} else if($username == "" || $username == ""){
echo '
';
} 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 '
';
} else {
echo '
';
}
}
}
?>



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'


No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...