在我从数据库中选择之后,当它实际上是 1 时我一直得到 0
代码:
$username = $_SESSION['username'];
echo $username;
$sql = "SELECT activated FROM members WHERE username = ?";
$stmt = $conn->prepare($sql);
$stmt->bind_param('s', $username);
$stmt->execute();
$stmt->bind_result($emailactivated);
$stmt -> close();
echo $emailactivated;
Echo 说 0.. 它应该是 1,注意:$username 不为空