Death_Octimus Posted February 22, 2010 Share Posted February 22, 2010 menu.php <?php import_request_variables("cgp","a"); if (! $aname ) { header('location:index.php'); } require_once('include/conf.inc.php'); //module header start if(!$apage) { include('modules/menu/menu_header.php'); }else{ $headpath = "modules/".$apage."/".$apage."_header.php"; include($headpath); } //theme start! echo T_HEADER; echo T_BODYHEAD; echo T_TITLEBAR; echo T_TABLESTART; echo $report; // module body start if(!$apage) { include('modules/menu/menu.php'); }else{ $bodypath = "modules/".$apage."/".$apage.".php"; include($bodypath); } // theme footer echo T_TABLEEND; echo T_FOOTER; ?> the above code is not behaving the way its ment to be when I call menu?m=1 which is from a switch in the header file it other wise works by sending the switch but the body include is dumped at top!! i'm stumped any ideas? menu_header.php <?php $loc = "Main Menu"; $loclink = "- <a href=\"menu.php\">Main Menu</a>"; switch ( $am ) { case "1": $report = "<tr><td colspan =\"2\" align =\"center\" class=\"red\">Your settings have been updated.</td></tr>"; break; case "2": $report = "<tr><td colspan =\"2\" align =\"center\" class=\"red\">Please go change <a href=\"userpass.php\">your password</a></td></tr>"; break; case "3": $report = "<tr><td colspan =\"2\" align =\"center\" class=\"red\">Your password has been updated.</td></tr>"; break; case "4": $report = "<tr><td colspan =\"2\" align =\"center\" class=\"red\">User has been added!</td></tr>"; break; case "5": $report = "<tr><td colspan =\"2\" align =\"center\" class=\"red\">The Email has been sent!</td></tr>"; break; default: $report = null; break; } ?> Link to comment https://forums.phpfreaks.com/topic/192930-include-not-working-the-way-its-ment-to-be/ Share on other sites More sharing options...
Death_Octimus Posted February 22, 2010 Author Share Posted February 22, 2010 okay its not the lncludes its the echo $report; I tried puting it in the body but it does not like it still very strange..... Link to comment https://forums.phpfreaks.com/topic/192930-include-not-working-the-way-its-ment-to-be/#findComment-1016123 Share on other sites More sharing options...
Death_Octimus Posted February 22, 2010 Author Share Posted February 22, 2010 I got it nevermind! Link to comment https://forums.phpfreaks.com/topic/192930-include-not-working-the-way-its-ment-to-be/#findComment-1016124 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.