/    Sign up×
Community /Pin to ProfileBookmark

include instead of frames?

how can i use php to do the same effect as frames in html?

thanks for any help
cyaz
andy

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@welshFeb 20.2006 — [code=php]<?php include 'a_file.html'; ?>[/code]
(just a reminder if you have this the page you include it on has to be .php (ex index.php))
Copy linkTweet thisAlerts:
@Markbad311Feb 20.2006 — php only works with " .php " files so keep that in mind. as far as frames and using them 90's are over. LOL Just kidding but if you have frames in any website you control get em out of there. the hurt you in so many ways.


Here is a cool link to help you in your journey!

http://www.garnetchaney.com/how_to_use_tables_instead_of_frames.shtml


basically he says to make a file like this:
[code=php]<?
$location=$_GET['location'];
if (empty($location)) {
$location='index';
}
//
changelocation($location);
//
function changelocation($location) {
include ('header.html');
echo '<table cols="2" border="0" cellpadding="10" cellspacing="0" align="center" width="100%">';
echo '<tr>';
echo '<td width="224" bgcolor="#0099FF" valign="top">'; include('navbar.html');
echo '</td>';
echo '<td bgcolor="#33CCFF">';
switch ($location) {
case 'index':
include ('actualindex.html');
break;
case 'tutorials':
include ('http://www.genericsite.com/tutorials/index.html');
break;
}
echo '</td></tr></table>';
include ('footer.html');
}
?>[/code]
×

Success!

Help @ajkiwi88 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.9,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...