newb Posted August 7, 2006 Share Posted August 7, 2006 [code]<?php// Begin Default Module Code if ( $_GET['name'] == NULL ) { $sql1 = mysql_query("SELECT * FROM p16_modules WHERE default_module = 1 LIMIT 1", $connection); $row = mysql_fetch_array( $sql1 ); $mod_active = $row['active_module']; $modtitle = $row['title']; $modpath .= "modules/".$modtitle."/".$file.".php"; if ( mysql_num_rows( $sql1 ) < 1 ) { echo "<font face='Tahoma' size='1'><b>Oh my god! No default module!!</b></font>"; } else if ( mysql_num_rows ($sql1 ) == 1 & mod_active == 1 & file_exists($modpath)) { include($modpath); } else { include($deactive); } } }// End Module Code?>[/code]The module is active and the file exists, yet it includes $deactive. any idea why?? please help! Quote Link to comment Share on other sites More sharing options...
hackerkts Posted August 7, 2006 Share Posted August 7, 2006 Try change[code]} else if ( mysql_num_rows ($sql1 ) == 1 & mod_active == 1 & file_exists($modpath)) {[/code]To[code]} else if ( mysql_num_rows ($sql1 ) == 1 && mod_active == 1 && file_exists($modpath)) {[/code] Quote Link to comment Share on other sites More sharing options...
newb Posted August 7, 2006 Author Share Posted August 7, 2006 i did doesnt help Quote Link to comment Share on other sites More sharing options...
king arthur Posted August 7, 2006 Share Posted August 7, 2006 Well, echo the three values you are testing in the if statement and see what they are. Quote Link to comment Share on other sites More sharing options...
newb Posted August 7, 2006 Author Share Posted August 7, 2006 oh nevermind i figured it out, i had to add $ to mod_active. works now thx. Quote Link to comment 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.