W bazie danych jest to rola 1 lub 2 - zatrudniony oraz administrator, zatem stworzyłem coś takiego:
$userrole = $row["userrole"]; deklaracja funkcji { if ($userrole === "1") { } else { } }
Mysql
Ale dostaję komunikat Undefined variable: userrole in
i każdy użytkownik jest administratorem, mimo że powinien być zatrudnionym