Я получаю сообщение об ошибке:
Object of class mysqli_result could not be converted to string
Это мой код:
$username2 = htmlentities($_SESSION['user']['username'], ENT_QUOTES, 'UTF-8');
$con = mysqli_connect('localhost','root','','test');
$result = mysqli_query($con, "SELECT classtype FROM learn_users
WHERE username='$username2';");
echo "my result <a href='data/$result.php'>My account</a>";