Periksa apakah sesi disetel
if (isset($_SESSION["userid"])) {
echo "Logged in";
} else {
echo "Not Logged in";
}
Undefined
if (isset($_SESSION["userid"])) {
echo "Logged in";
} else {
echo "Not Logged in";
}