Hey there guys,
I need a html included in a php. For example:
You click a link on the navigation menu and the html appears on the homepage, like www.HabbVillage.co.uk.
+Rep up for grabs!

Hey there guys,
I need a html included in a php. For example:
You click a link on the navigation menu and the html appears on the homepage, like www.HabbVillage.co.uk.
+Rep up for grabs!
www.habbmania.co.uk >> Send me a pm if you need a habbo fansite job!
Check out some of my videos!
You can include HTML in php pages outside the <?php ?> tags.
<?php
echo("Hi");
?>
<html>
<head>
<title>ImDumb</title>
</head>
<body>
lalala
</body>
</html>
Hi, names James. I am a web developer.
That site is using an iframe to make content appear.
You can tell cos otherwise there'd be a url like
http://www.sitename.com/something.php?page=666
Try this:
http://www.dynamicdrive.com/dynamici...iframessi2.htm
Make a folder called files and then, add your html files to it.
Use this php code to display them
So to make that code work you would need a file called home.html and a file called guides.htmlPHP Code:Your layout code here
<a href="index.php?page=home">Home</a>
<a href="index.php?page=guides">Guides</a>
<?php
$Page = $_GET["page"];
include("files/$Page.html");
?>
Your layout code here
![]()
Lets set the stage on fire, and hollywood will be jealous.
try this:
<iframe src="widthhere%" height="heighthere%" src="URL/TO/FILE" frameborder="0" />
try that =]
should be
<iframe src="widthhere%" height="heighthere%" src="URL/TO/FILE" frameborder="0"></iframe>
iframe has a closing tag :]
anyway..
then you'd just use this for your hyperlinks.PHP Code:<?php
$page = $_GET['page'];
if(!isset($page))
{
include("home.php");//Home page..
}
else if(file_exists("" . $page . ".php"))
{
include("" . $page . ".php");
}
else
{
echo("<h1>Error..</h1>The file <strong>" . $page . ".php</strong> was not found.");
}
?>
That should do what you're looking for?HTML Code:<a href="?page=home">Home</a> <!-- Links to home.php --> <a href="?page=news">News</a> <!-- Links to news.php -->
Jme gots +rep![]()
www.habbmania.co.uk >> Send me a pm if you need a habbo fansite job!
Check out some of my videos!
Iframes are total crap, even though must ajax is by iframe, I prefer includes..
And you can just include .html files within php anyway?
PHP Code:<?php
// Include file below
include('page.html');
?>
do it by includesMuch better
Joe
Thing is I bet you're making a radio fansites or something. If you're making a radio fansite they PHP includes are no use to you. You'll either have to use AJAX or an iFrame.
Want to hide these adverts? Register an account for free!