Hi ,
Sorry i am new to php. I have a secure site that logs in a user with a session file. I also have a database with articles and a field for each article with PRIVATE=YES/NO.
Basically what i would like is if the user is logged in with his own ID which is classified by ROLE (1 or 2) if they are a user with role 1 AND the article queried is PRIVATE then show the data otherwise no results are displayed.
So currently I have something like this to hide a particular link on my site:
<?php if ($_SESSION['chart'][ 'Search' ][ 'View' ] ) { echo $link } ?>
i would like to add to the argument to somthing like this
<?php if ($_SESSION['chart'][ 'Search' ][ 'View' ] AND $row_GetSearch['private'] == 'YES') { echo $link } ?>
Is that possible?
Any help is apprecaited
thanks,
dR
Sorry i am new to php. I have a secure site that logs in a user with a session file. I also have a database with articles and a field for each article with PRIVATE=YES/NO.
Basically what i would like is if the user is logged in with his own ID which is classified by ROLE (1 or 2) if they are a user with role 1 AND the article queried is PRIVATE then show the data otherwise no results are displayed.
So currently I have something like this to hide a particular link on my site:
<?php if ($_SESSION['chart'][ 'Search' ][ 'View' ] ) { echo $link } ?>
i would like to add to the argument to somthing like this
<?php if ($_SESSION['chart'][ 'Search' ][ 'View' ] AND $row_GetSearch['private'] == 'YES') { echo $link } ?>
Is that possible?
Any help is apprecaited
thanks,
dR