Menu
Hi
New guy, I have created my web page format using css. I have a page which is my template format colors, text info etc saved as css. I created a seperate page with the links to my webpage. how do I get this so that it shows on everypage. (making the links part of my foramt
[code=php]
<?php
include("links.php");
?>
[/code]
[code=html]
print ' <li><a href=yourpage>link</a></li> ';
...
[/code]
[code=html]
<script src=menu.js></script>
[/code]
[CODE]<? phpinfo(); ?>[/CODE]
[code=php]
<?php
include("links.php");
?>
[/code]
[code=php]
<?
if (isset($page)) { // check i var page is set
if (file_exists($page.php)) { // check if $page .php exists
include($page.php); // include the file (add it to your page)
}
else {
include(404.php); // if page doesnt exist 404 error (instead of PHP error)
}
}
else {
include(news.php); // default (eg with out going *.php?page=*)
}
?>
[/code]
[code=html]
<a href=index.php?page=content>OPEN CONTENT</a>[/code]
[code=php]
<?
$page = $_GET["page"]; // get var page from address
$file = $page.".php"; //var file = $page.php
if (isset($page)) { // check if var page is set
if (!file_exists($page.'.php')) { // check if $page .php exists
$file = '404.php'; // doesnt exist... add 404
}
else {
$file = $page.".php"; // exists continue to include
}
}
else {
// default, $page is not set (eg with out going *.php?page=*)
$file = 'news.php';
}
include ($file); // include the file to your page
?> [/code]
include ($file);
0.1.9 — BETA 6.17