check if you are logged in to a specific session

Asked

Viewed 47 times

0

Good afternoon, guys. I’m in trouble and I can’t think of a better place to fix this than here:

I have a website that both admin logins with access to common roles and members will access. The doubt is on how I will separate to only display the functions to the administrators, because until then I was using this:

session_start();

if(!isset($_SESSION["email"]) || !isset($_SESSION["senha"])){
    session_write_close();
    header("Location: index.php");
    exit; //encerra todas as funções e leva para o index
}
else{
    echo "<center>Você está logado.</center>";
}

But now that I’ve put in the membership register I don’t know what to do. Thank you!

  • has something in the register that identifies the type of user ?

  • 1

    I think you’re looking for that...

  • @gustavox is just that! I’m just having trouble translating the part of the code into mysql for postgres commands...

  • So I think you better ask another question by putting in it the mysql code you want to convert in postgres commands...

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.