Folks,
I just want to check if the ‘session type’ is ‘registration’ or not.
Q1.
Is this correct or not ?
[code]
if(!isset($_SESSION[‘session_type’] == ‘registration’))
Or is this correct ?
[code]
if(!isset($_SESSION[‘session_type’]) == ‘registration’)
Or, maybe none of them are correct ? How would you write it ?
Q2.
I just want to check if the ‘session type’ is ‘set’ or ‘not’ and if it is then whether the session type is ‘registration’ or not. That is all. How to check this ?
Which one of these following are correct ?
Is this one is correct ?
[code]
if(!isset($_SESSION[‘session_type’]) && if(!isset($_SESSION[‘session_type’]) == ‘registration’))
Or is this one correct instead ?
[code]
if(!isset($_SESSION[‘session_type’]) && ($_SESSION[‘session_type’]) != ‘registration’)
Or, maybe none of them are correct ? How would you write it ?