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! Link to comment https://forums.phpfreaks.com/topic/16762-help11-script-is-acting-up11/ 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] Link to comment https://forums.phpfreaks.com/topic/16762-help11-script-is-acting-up11/#findComment-70498 Share on other sites More sharing options...
newb Posted August 7, 2006 Author Share Posted August 7, 2006 i did doesnt help Link to comment https://forums.phpfreaks.com/topic/16762-help11-script-is-acting-up11/#findComment-70764 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. Link to comment https://forums.phpfreaks.com/topic/16762-help11-script-is-acting-up11/#findComment-70768 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. Link to comment https://forums.phpfreaks.com/topic/16762-help11-script-is-acting-up11/#findComment-70769 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.