1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

else if condition

Discussion in 'PHP' started by jmurphy444, Feb 24, 2011.

  1. #1
    I am trying to have a specific user not allowed to see a link if THEY are logged in. Here is the basic code for everybody...if logged in they can see the SETTINGS tab.....I want an addition to this.

    <?php if( $this->user->is_logged ) { ?><a href="<?= $C->SITE_URL ?><?= $this->user->info->username ?>" id="username"><span>Welcome <?= $this->user->info->username ?></span></a></td>
    <td width="10" align="center" bgcolor="EFEFEF">&nbsp;</td>
    <td width="250" align="right" bgcolor="EFEFEF">
    <a href="<?= $C->SITE_URL ?>settings"><b><?= $this->lang('hdr_nav_settings') ?></b></a> |
    <a href="<?= $C->SITE_URL ?>signout"><b><?= $this->lang('hdr_nav_signout') ?></b></a></div>
    <?php } else { ?>

    ------------- this needs to have the user "Anonymouse" if logged in to NOT see the SETTINGS tab.

    Any ideas?
    jmurphy444, Feb 24, 2011 IP
  2. srisen2

    srisen2 Peon

    Likes Received:
    Best Answers:
    Trophy Points:
    i usually check the database and it a variable is not true or the users session id does not match an account then you just redirect them

    you can also do a

    if ($member == 1){
    echo "settings options";
    srisen2, Feb 24, 2011 IP