if statement help

Hi everyone,

I’m trying to display a button when certain conditions are met.
However I get a syntax error whenever I try it.

[php]if (logged_in() === true && (has_access($user_data[‘user_id’], 1) == true) {
//Do something
}[/php]

basicly logged_in() checks if the user has an active sessions and has_acces check the user type(for admin etc)

Could something tell me what i’m doing wrong ??

[php]if ( (logged_in() === true) && (has_access($user_data[‘user_id’], 1) == true) ) {
//Do something
}[/php]

Give that a shot

You really just need to remove the opening parentheses before has_access

Sponsor our Newsletter | Privacy Policy | Terms of Service