a question about PHP include

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
khoelscher
Forum Newbie
Posts: 1
Joined: Tue Dec 28, 2010 11:17 am

a question about PHP include

Post by khoelscher »

I am doing static html prototyles. I am not really a php guy but know a touch

I use php includes to pull in content into certain areas to make updating the demos easier (there is no DB running - this is all static)

so, I would have an area like this:

<div id="content">
<?php include("iview-guidelines.php"); ?>

</div><!-- end middle -->

the 'iview-guidelines' page is straight html nothing fancy there

<!-- iview-->
<div id="iviewcontainer">
<div id="tableft"><h4>HR Guidelines</h4>

<div id="tabrightM"></div>
</div>
<div id="iviewM"><div id="links"><a href="#">Email</a> | <a href="#">Print</a> | <a href="#">Bookmark</a></div>
<div style="border:1px solid #e6e6e6;width:95%;margin:20px auto 0px auto;height:140px;"> <div style="float:left;padding:5px;width:190px;height:140px;"><img src="../images/HR_Guidelines_SpotlightImage_US.jpg" /></div><p>These pages contain the policies and guidelines regarding your rights and obligations as an employee at Intel. Find the answers to any questions you may have on attendance, vacation, workplace rules, and a wide variety of topics that affect your daily work life.</p></div>
<br />

<ul>
<li><a href="iview-content-tba.php" target="_top">R Guidelines Introduction</a></li>
<li><a href="#">Employee Data Request </a></li>
<li><a href="#">EDR Checklist</a></li>
<li><a href="#">EDR Guideline</a></li>
</ul>
</div>

</div><!--end iview-->

So this is were the question starts. We now want to make the links on the 'guidelines' page click-able - go to a content TBA page.

Well, I could create a new for every single one (hundreds of pages in multiple demos) but what I thought would be better is somehow swap out this block of code with the same structure and simple text saying Content TBS

So, is there any way to click on the link and just replace this php include for a new php include? I have a feeling this wasn't set up good enough from the begining anyways, but thought I'd ask anyways
Post Reply