-1
11行是while ($row = mysqli_fetch_array($select_user_profile_query)) {
Mysqli_fetch_array()布爾誤差
警告:mysqli_fetch_array()預計參數1被mysqli_result,在C中給出布爾:\ XAMPP \ htdocs中\仁達\管理員\ profile.php第11行
if(isset($_SESSION['username'])) {
$username = $_SESSION['username'];
$query = "SELECT * users WHERE username ='{$username}' ";
$select_user_profile_query = mysqli_query($connection, $query);
while ($row = mysqli_fetch_array($select_user_profile_query)) {
$user_id = $row['user_id'];
$username = $row['username'];
$user_password = $row['user_password'];
$user_firstname = $row['user_firstname'];
$user_lastname = $row['user_lastname'];
$user_email = $row['user_email'];
$user_image = $row['user_image'];
$user_role = $row['user_role'];
}
}
謝謝!
你缺少了'from'在SQL – RamRaider
始終使用mysqli_error(在此之前,查詢成功)到獲取查詢錯誤。 –