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
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     |
|         |                    |
------------------------  

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.