Thread: PHP Help
View Single Post
11-23-2005, 04:34 AM
#22
xFS.ShibSta is offline xFS.ShibSta
Status: Junior Member
Join date: Nov 2005
Location:
Expertise:
Software:
 
Posts: 31
iTrader: 0 / 0%
 

xFS.ShibSta is on a distinguished road

  Old

Yeah, I explained to him on MSN a way to do this and I'll post it aswell incase anyone else has this issue they can see it...
just need to replace line 101 with:
Code:
<? 
if ( $section == "" ) {
    include("main.php"); 
}else{
include($section . ".php");
}
?>
The reason it was not working is because on index.php he was using the content file main.php... Also it had no $section value... so I added
if ( $section == "" ) { so that it would reconize that it needed to pull main.php..
The rest is just an else statement saying to display a .php file with the same name as the url... (Ex. index.php?section=funny would display funny.php)