FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Php nav links?





SFMeatwad
I've been to several sites and none of them have worked for either errors or whatever.

Can someone please tell me how?

Thanks.
{name here}
SFMeatwad wrote:
I've been to several sites and none of them have worked for either errors or whatever.

Can someone please tell me how?

Thanks.

Code:

echo '<a href="index.html">Site Home</a>';
DanielXP
Code:
switch($_GET['action']) {
default:
echo "welcome to default page!<br><br>
<a href='page.php?action=page1'>go to page 1</a><br>
<a href='page.php?action=page2'>go to page 2</a>";
break;

case "page1":
echo "welcome to page 1";
break;

case "page2":
echo "welcome to page 2";
break;
}
?>
fromegame
Code:

<?php
if(!isset($_GET['page'])) {
    include("default.php");
}else{
    include($_GET['page'] . ".php");
}
?>


Like that Twisted Evil
sonam
Can you explain little bit more what do you want!

Sonam
DanielXP
fromegame wrote:
Code:

<?php
if(!isset($_GET['page'])) {
    include("default.php");
}else{
    include($_GET['page'] . ".php");
}
?>


Like that Twisted Evil


This one is ok but your letting any page be viewed on here.

Basicly if the page is not set it will include the code of 'default.php' but is there is a page set such as 'page1' then it would include 'page1.php'
Related topics
Site Nav Suggestions...
Programming links, info, and tutorials
[FuN]Gokus Web-Templates And Sigs (Now Closed)
red hot chili pepper fans?
how to make a php nav
PHP scripts
FRIH$ For a dropdown navbar
Need tab bar navigation links 200 Frih$
HUGE FREE LINK EXCHANGE!!
Script of iets wat aantal kliks aangeeft.
tell me what you think
What is a site without tables?
Lemmings
RPG Maker... for all of you who want to make your own game!
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.