• Hi there,
    i have 2 varables: ‘$user_ID’ and ‘is_supporter()’

    What i need it to say is the following:

    If user has logged in, echo ‘redirect’;
    If user has logged in and is supporter, echo ‘welcome’
    else, echo’welcome to my website’

    I have tried the following:

    if ($user_ID) {
        echo "im logged in";
    } elseif (is_supporter()) {
        echo "im subscribed";
    } else {
        echo "redirect";
    }
    ?>

Viewing 1 replies (of 1 total)
  • Thread Starter denzel2364

    (@denzel2364)

    if ($user_ID) {
    echo “im logged in and need to subscribe”;
    } ANDif (is_supporter()) {
    echo “im subscribed”;
    } else {
    echo “Im just browsing”;
    }
    ?>

    Edit: better code for understanding

Viewing 1 replies (of 1 total)

The topic ‘php – userid & if subscribed show this (im learning php)’ is closed to new replies.