Member Avatar for Puster

Hello!
Yes, I am making a login system that recognize if the moderator is the main moderator or sub moderator.

So i made a type row. If type = 2 the moderator is main and if it is 1 the user is a admin.

So I made this on the main admin site

if(!isSet($_SESSION['username']&& $_SESSION['type'] == 1))
{
header("Location: ../index.php");
exit;
}?>

But I've got an error

Parse error: syntax error, unexpected T_BOOLEAN_AND, expecting ',' or ')' in C:\xampp\htdocs\sjohaugbygg\admin\index.php on line 3

What should I do?

Best regards
//Joakim

It should be isset... all lowercase.

Member Avatar for Puster

hi, thx
Fixed it but got the same error:S
So what should I do?

This perhaps:

if (! isset($_SESSION['username']) && ($_SESSION['type'] == 1))

It depends on what you want...

Member Avatar for diafol

I assume you have an open php tag.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.