Jump to content

Recommended Posts

hi, am working on a php site, and i have alot of information to display in the head and the footer, so i dont want them to be loaded everytime the user hits on a link, so i need to change only a part of a page using a href link (frame like i mean) here is an example of what i need in my site:


<?php
&content = "homepage.php";
$buttons = array('Home' => 'home.php',
'Fun' => 'fun.php',
'Contacts' => 'contacts.php',
'Services' => 'services.php',
'Site map' => 'map.php');
?>
<table>
<tr>
<td width="100">
<?php
foreach ($buttons as $name => $url)
{
echo "<a href='".htmlentities($url)."'> $name </a><br>";
}
?>
</td>
<td width="500">
<? require($content); ?>
</td>
</tr>
</table>


if someone can tell me please how can i use the href that is created by the foreach loop to change the $content value so to change the cell content only, i'de be thankfull

thanks alot guys for the help, hope to hear from u soon
Link to comment
https://forums.phpfreaks.com/topic/10705-need-help-plz/
Share on other sites

thanks randy for ur help but this doesnt solve my problem, i tried the iframe before but there will be another problem that the iframe wont resize itself to fit the document's height and will give me a scrollbar instead, what i need is to use the page's scrollbar itself not the iframe's scrollbar.
Link to comment
https://forums.phpfreaks.com/topic/10705-need-help-plz/#findComment-40027
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.