That was a year (And a half) ago xD, I know ALOT more about php :P
Printable View
That was a year (And a half) ago xD, I know ALOT more about php :P
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');
}
?>
$_GET['page'];
should be
$page = $_GET['page'];
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
I perfer .htaccess MOD rewrite ;]
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.