Jump to content

adding content within a "frame"


runnerjp

Recommended Posts

hey guys... i wanna keep my main page the same but in the text area change the text depedning on the page

 

i thought about using something like

<?
	if (file_exists($content)) {
	include($content);
	} else {?>

on index.php

 

then on the pages where the content is add $content="name.php";

 

i did this to show what i mean... i just wanna chnage data in contant chnage here area

 

-----------------------

|        header            |

|                              |

-----------------------

|        |                    |

|        |                    |

|        |    content    |

| menu |    change    |

|        |        here    |

|        |                    |

------------------------

Link to comment
https://forums.phpfreaks.com/topic/91047-adding-content-within-a-frame/
Share on other sites

i want it so if a go to www.mypage.com/profile.php then tho profile will be shown on the content area

 

or www.mypage.com/about.php then about would be shown in content area

-----------------------
|        header             |
|                              |
-----------------------
|         |                    |
|         |                    |
|         |    content     |
| menu |     change     |
|         |         here     |
|         |                    |
------------------------  

ok i used this

 

	<?php if (isset($_GET['section'])) {
    $section = $_GET['section'];
} else $section = 'main';

$file = 'includes/'.$section.'.php';
if (file_exists($file)) {
    include $file;
}  ?>

 

 

and added includes/main.php

 

no main shows up ??

 

even when i try http://runningprofiles.com/members/index.php?section=main

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.