If not following correct procedure?

Posted by ct2k7 on Stack Overflow See other posts from Stack Overflow or by ct2k7
Published on 2009-12-10T21:55:26Z Indexed on 2010/05/12 23:44 UTC
Read the original article Hit count: 184

Filed under:
|

Hi, I'm working on a Content Management System, and so far so good.

I'm trying to get the system to work with a maintenance mode system. This is the code in the script to display the maintenance stuff:

if ($maintenance['value'] == "1") {?>
    <div id="content">
     <div id="errmsg">
      <?php echo $maintenance['notes']; ?>
     </div>
    </div>
<? } else {?>

   <h1><?php echo $title; ?></h1>
   <hr /><br />
   <div id="content">
    <?php echo $contents; 
     if (!$content) { 
      include    ('includes/error/404.php');}?>
   </div>   			
<? } ?>

I can verify that the $maintenance['value'] variable is working as it should, but this portion o the script isn't working as it should. The value is currently set to 1, but it still displays the stuff in the else.

Any ideas?

© Stack Overflow or respective owner

Related posts about php

Related posts about if-statement