Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,471
There are 969 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

PHP Help

Thread title: PHP Help
Closed Thread  
Page 3 of 3 < 1 2 3
    Thread tools Search this thread Display Modes  
11-22-2005, 10:25 PM
#21
Salathe is offline Salathe
Salathe's Avatar
Status: Community Archaeologist
Join date: Jul 2004
Location: Scotland
Expertise: Software Development
Software: vim, PHP
 
Posts: 3,820
iTrader: 25 / 100%
 

Salathe will become famous soon enough

Send a message via MSN to Salathe

  Old

Just a quick Q for Vince4Heisman. But what if your PHP page is 'test.php' and you visit the url 'test.php?page=test'. Give it a try.

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)

Closed Thread  
Page 3 of 3 < 1 2 3


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed