How do you use them? Because I've tryed and tryed but every time I click the link it goes to the index.php?page=about.php but the included page does not change. Can some one post on how to do it please.
Thanks,
Tom.

How do you use them? Because I've tryed and tryed but every time I click the link it goes to the index.php?page=about.php but the included page does not change. Can some one post on how to do it please.
Thanks,
Tom.
<?php
include ('somthink.php');
?>
<?php
$file = $_GET[page];
include("$file.php");
?>
Then have as your link: pagecodeison.php?page=home
Blah, I dont know lol.
Far too insecure, use something like this:
PHP Code:<?php
$url = $_GET["view"];
$site = ("http://url.tld/folder/"); // Write the full url to the folder that the file is in, without the trailing slash ( / )
$rofl = str_ireplace("../", "", $url); // Replace all ../ with nothing to stop naughty lil hacker wannabe ganster rappers.
if(isset($_GET["view"])) // if ?view=blah is set
{
if(file_exists("$rofl.php")) // if $rofl ($_GET["view"] - ../) exists
{
include("$site/$rofl.php"); // Include that file .php!
}
else
{ // If it doesn't exist.
include("404.php"); // Include the 404 page!
}
}
else // If it isn't set....
{
include("welcome.php"); // Include the welcome page
}
?>
Last edited by Jewish Bear; 24-01-2007 at 01:33 PM.
visit my internet web site on the internet
http://dong.engineer/
it is just videos by bill wurtz videos you have been warned
Want to hide these adverts? Register an account for free!