The mysqli_query() method returns an object resource to your $result variable, not a string.
You need to loop it up and then access the records. You just can’t directly use it as your $result variable.
while ($row = $result->fetch_assoc()) {
echo $row[‘classtype’].”
“;
}
Before using the $result variable, you should use $row = mysqli_fetch_array($result) or mysqli_fetch_assoc() functions.
Like this:
$row = mysqli_fetch_array($result);
and use the $row array as you need.