[HELP] Show selected content from HTML in PHP
I would like to create a page that has "similar" functionality like 'Facebook'. What I mean is the dynamic page in center that shows you posts from another people etc.. Basically, create one page that stores all stuff to be shown and second one that shows it.
The page would look like this:
Top banner and menu alongside with side panel are fixed to page. In between them is frame, that displays "content; a "content.php". This "content.php" gets its content to show from source file "source.html". Source.html stores all information/ data that has to be shown through "content.php" in from of <div> tags (blocks). So it is like this:
main page + content
<a href="content1" target="frame">link to content1</a>
<a href="content2" target="frame">link to content3</a>
<a href="content3" target="frame">link to content3</a>
<iframe id="frame" src="centent.php" name="frame"></iframe>
So if I click the link "content1" on main page, the "content.php" will take info/data from "source.html" that is listed as "content1" and shows it in the frame. Not entire "source" page, only part that is listed as "content1".
<div id=content1>Content to be shown</div>
<div id=content2>Content to be shown</div>
<div id=content3>Content to be shown</div>
The question is, how do I do it?
The page isn't that much problem as the PHP. I know there are these stuff in PHP (in between body tags are these <? ?> ), but i don't know what tags / how to use them to show only a certain content (div/block) from file.
Maybe you're asking: "why don't you create separate pages for each content?" (like content1.html, content2.html...) The reason for this is, I'm making a school project and I have to use PHP and I don't know where to use it. And secondly, if every page would have their own file, I would lost track of it. So that's why I want to use it this way.
Can someone help me, please?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)