my error is
"Object of class mysqli_result could not be converted to string"
my code error line is :
$type = queryMysql("SELECT `type` FROM `register` WHERE `name` = '$name'");
echo "$type";
if ($type == "admin")
{
die("Welcome back Admin $name <br> you can go to the control panel by clicking <a href='#'>here</a>");
}
elseif ($type == "user")
echo "Welcome back user $name.";
the "type" is defined in the database as "admin" or "user", and the error line is the "echo '$type';"
Aucun commentaire:
Enregistrer un commentaire