What's wrong with this function?

Posted by ct2k7 on Stack Overflow See other posts from Stack Overflow or by ct2k7
Published on 2009-06-07T19:14:12Z Indexed on 2010/05/12 23:44 UTC
Read the original article Hit count: 217

Filed under:
|
|

Hello, I'm using this function to determine whether my application should be online or offline:

function online() {
   if ($online == "0") {
     if($_SESSION['exp_user']['userlevel'] != "1") {
          include("error/offline.php");
          exit();
                                                   } 
                        }
                   }

However, with the data value set to 0 in the database, and $online does = '0', why is error/offline.php not included for those whoose user level is not 1?

Thanks :)

© Stack Overflow or respective owner

Related posts about php

Related posts about functions