Error - Cannot use isset() on the result of an expression (you can use "null !== expression" instead)
I'm getting the error above the start of the if statement and the else line.
Iv done the code the way I have because , the $user_id is chosen from a drop down box, Unless its the first option from that box which doesn't have a value.
The code below should be able to tell if the option from the dropdown box has a value . If so it displays just information relevant to that user. Otherwise it will show everything.
$user_id = $_REQUEST['userid'];
$user_hack = 0;
echo $user_hack;
if(isset($user_id > $user_hack))
{
echo "Yup";
$sql = "SELECT ub.id, users.name, individualbadges.badgename, ub.level FROM userbadges ub INNER JOIN users ON users.id = ub.user_id INNER JOIN individualbadges ON individualbadges.id = ub.badge_id WHERE users.id = $user_id ";
}
else
{
die("Parameter is missing!");
$sql = 'SELECT ub.id, users.name, individualbadges.badgename, ub.level FROM userbadges ub INNER JOIN users ON users.id = ub.user_id INNER JOIN individualbadges ON individualbadges.id = ub.badge_id';
}
$query = mysqli_query($connection, $sql);