Alright so, I made this little account check using simple SQL & PHP but it seems to return false instead of true if account exists.
public function ifExists($name) {
$handler = new sql();
$sql = $handler->connect();
$sql->real_escape_string($name);
$result = $sql->query("SELECT ime FROM users WHERE ime='".$name."'");
if($result == false) {
if($result->num_rows != 0) {
$echo = 'account exists';
return true;
}
else {
return false;
}
}
}
And now here is the check
if($result->num_rows != 0) {
$echo = 'account exists';
return true;
}
else {
return false;
}
There is a row with ime='toma' in the sql