Captain09 Posted August 5, 2012 Share Posted August 5, 2012 hi, here is my code: <?php include ("GameEngine/config.php"); if (buytroops == true) include ("buytroops.tpl"); else; if (buypop == true) include ("buypop.tpl"); else; If (buyress == true) include ("buyress.tpl"); else; ?> and thats the config file: define ("buypop","false"); define ("buytroops","false"); define ("buyress","false"); but it still includes the files whats wrong? Quote Link to comment https://forums.phpfreaks.com/topic/266704-if-variable-true-include-doesnt-work/ Share on other sites More sharing options...
jazzman1 Posted August 5, 2012 Share Posted August 5, 2012 This is wrong: define ("buypop","false"); to be define ("buypop",false); Quote Link to comment https://forums.phpfreaks.com/topic/266704-if-variable-true-include-doesnt-work/#findComment-1366950 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.