That was a year (And a half) ago, I know ALOT more about php
![]()

That was a year (And a half) ago, I know ALOT more about php
![]()
Chippiewill.
No matter what code I use, all my links just stay at home.php rather than going to their repspective pages, (news.php, values.php, guides.php etc).
The latest thing I tried was this which I found the basis of earlier in the thread:
does anyone know how I can make it work?? :eusa_wallCode:<?php $_GET['page']; if($page == "home") { include('home.php'); } elseif($page == "news") { include('news.php'); } elseif($page == "values") { include('values.php'); } elseif($page == "guides") { include('guides.php'); } elseif($page == "knowledge") { include('knowledge.php'); } elseif($page == "links") { include('links.php'); } else { include('home.php'); } ?>
Here's a very basic one I just whipped up.
So the url would be index.php?p=(page).(extension).PHP Code:<?php
if ($_GET[p]) {
$url = $_GET[p];
include($url);
}else{
include ("main.html");
}
?>
If you don't put ?p=(page).(extension) after index.php, it'll include main.php.
Example:
http://yourwebsite.com/index.php?p=home.html
My last reputation was from ThisNameWillDo!.
I perfer .htaccess MOD rewrite ;]
█ PureHosts.com
█ Shared, ShoutCAST, and reseller hosting.
█ Reasonable prices, amazing support.
Views expressed by me through my HXF, CHF or any forum account, do not necessarily express the views or opinions of Pure Web Solutions.
I didn't read all pages, so I'm not sure that if this has been mentioned but when I used to play around with fansites and such, the reason for using an iframe was simply because you could load pages into the current one without disrupting the radio. With his method it would cause the radio to keep restarting, which is frankly quite irritating.
For a non-radio site though, this is clearly a good method to use.
Or you have the entire site contained within an iframe with the radio outside the iframe controlled by js from within. Or you could just use javascript to include the content which is safer anyway.I didn't read all pages, so I'm not sure that if this has been mentioned but when I used to play around with fansites and such, the reason for using an iframe was simply because you could load pages into the current one without disrupting the radio. With his method it would cause the radio to keep restarting, which is frankly quite irritating.
For a non-radio site though, this is clearly a good method to use.
Chippiewill.
Want to hide these adverts? Register an account for free!