我对PhP很新,我正在尝试建立一个具有权限的员工门户网站。当我尝试从表中获取数据时,页面返回“无法处理此请求”。感谢任何帮助,这是我尝试过的。
<?php
include('./classes/Login.php');
if (Login::isLoggedIn()) {
$userid = Login::isLoggedIn();
$staff = "true";
$con=mysqli_connect("localhost","mqefjvgt_portal","-password sniped-","mqefjvgt_portal");
$radiodj_query = mysqli_query($con,"SELECT is_radio FROM users_permissions WHERE id=$userid;");
if ( $radiodj_query == "1" ){
$radiodj = "true";
$staff = "true";
}
$media_query = mysqli_query($con,"SELECT is_media FROM users_permissions WHERE id=$userid;");
if ( $media_query == "1" ){
$media = "true";
$staff = "true";
}
$management_query = mysqli_query($con,"SELECT is_management FROM users_permissions WHERE id=$userid;");
if ( $management_query == "1" ){
$management = "true";
$staff = "true";
}
$admin_query = mysqli_query($con,"SELECT is_admin FROM users_permissions WHERE id=$userid;");
if ( $admin_query == "1" ){
$admin = "true";
$staff = "true";
}
$owner_query = mysqli_query($con,"SELECT is_owner FROM users_permissions WHERE id=$userid;");
if ( $owner_query == "1" ){
$owner = "true";
$staff = "true";
}
echo $owner_query;
echo $admin_query;
echo $management_query;
echo $media_query;
echo $radiodj_query;
} else {
echo "<meta http-equiv=\"refresh\" content=\"0;URL='login.php'\" />";
}
?>