Question: Basically, I have been having some trouble with sending a request to a MySQL server and receiving the data back and checking if a user is an Admin or just a User.

Admin = 1
User = 0

```
<?php 
$checkAdminQuery = "SELECT * FROM `users` WHERE `admin`";
$checkAdmin = $checkAdminQuery
mysqli_query = $checkAdmin;

if ($checkAdmin == 1) {
echo '<h1>Working!</h1>';
}else {
echo '<h1>Not working!</h1>'; 
}

?>

```

Sorry that this may not be as much info needed, I am currently new to Stack Overflow.

Answer: 
// get all admin users (assumes database already connected)

```
$rtn = array();
$checkAdminQuery = "SELECT * FROM `users` WHERE `admin`=1";
$result = mysqli_query($dbcon,$checkAdminQuery) or die(mysqli_error($dbconn));

while($row = mysqli_fetch_array($result)){
   $rtn[] = $row;
}

```
```
$checkAdminQuery = "SELECT * FROM `users` WHERE `admin`"; !!!!

```

where what ? you need to specify where job = 'admin' or where name ='admin'
you need to specify the column name where you are adding the admin string