dezkit Posted April 27, 2008 Share Posted April 27, 2008 Change the links from index.php?content= to index.php?page= and use MY CODE Quote Link to comment https://forums.phpfreaks.com/topic/102985-less-php-pages/page/2/#findComment-528469 Share on other sites More sharing options...
Ne.OnZ Posted April 27, 2008 Author Share Posted April 27, 2008 Still the same errors D: Index: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>DivnX :: Home</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <link rel="stylesheet" type="text/css" href="css/divStyle.css" /> <script src="javascript/navigation.js" type="text/javascript"></script> </head> <body> <div id="gradient"> <div id="main"> <div id="banner"> <img src="images/Header.png" alt="DivnX" /> </div> <div id="logon"> <?php include("includes/Login.php"); ?> </div> </div> </div> <div id="content"> <div id="nav"> <ul id="menu" style="text-align: center"> <li>Site <ul> <li><a href="index.php?page=Home">News</a></li> <li><a href="index.php?page=Site_Map">Site Map</a></li> <li><a href="board/index.php">Forums</a></li> <li><a href="index.php?page=Members">Members</a></li> </ul> </li> <li>Guides <ul> <li><a href="index.php?page=C++">C++</a></li> <li><a href="index.php?page=Java">Java</a></li> <li><a href="index.php?page=PHP">PHP</a></li> <li><a href="index.php?page=CSS">CSS</a></li> <li><a href="index.php?page=HTML">HTML</a></li> </ul> </li> <li>Games <ul> <li><a href="index.php?page=Games">Coming Soon!</a></li> </ul> </li> <li>Account <ul> <li><a href="index.php?page=Settings">Settings</a></li> <li><a href="index.php?page=Stuff">My Stuff</a></li> <li><a href="index.php?page=Profile">Profile</a></li> </ul> </li> <li>Support <ul> <li><a href="index.php?page=Contact">Contact Us</a></li> <li><a href="index.php?page=FAQ">FAQ</a></li> <li><a href="index.php?page=Staff">Staff</a></li> <li><a href="index.php?page=Donate">Donate!</a></li> </ul> </li> </ul> </div> <div id="stuff"> <?php include("includes/Page.php"); ?> </div> </div> </body> </html> Page: <?php $page_name = $_GET['page']; if(!$page_name) { include("/index.php"); } elseif($page_name == 'Register') { include("/create.php"); } elseif($page_name == 'Site_Map') { include("/map.php"); } elseif($page_name == 'Members') { include("/members.php"); } elseif($page_name == 'C++') { include("/guides/c++.php"); } elseif($page_name == 'Java') { include("/guides/java.php"); } elseif($page_name == 'PHP') { include("/guides/php.php"); } elseif($page_name == 'CSS') { include("/guides/css.php"); } elseif($page_name == 'HTML') { include("/guides/html.php"); } elseif($page_name == 'Games') { include("/games.php"); } elseif($page_name == 'Settings') { include("/account/settings.php"); } elseif($page_name == 'Stuff') { include("/account/stuff.php"); } elseif($page_name == 'Profile') { include("/account/profile.php"); } elseif($page_name == 'Contact') { include("/support/contact.php"); } elseif($page_name == 'FAQ') { include("/support/faq.php"); } elseif($page_name == 'Staff') { include("/support/staff.php"); } elseif($page_name == 'Donate') { include("/support/donate.php"); } else { echo "404 Not Found!"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/102985-less-php-pages/page/2/#findComment-528472 Share on other sites More sharing options...
dezkit Posted April 27, 2008 Share Posted April 27, 2008 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>DivnX :: Home</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <link rel="stylesheet" type="text/css" href="css/divStyle.css" /> <script src="javascript/navigation.js" type="text/javascript"></script> </head> <body> <div id="gradient"> <div id="main"> <div id="banner"> <img src="images/Header.png" alt="DivnX" /> </div> <div id="logon"> <?php include("includes/Login.php"); ?> </div> </div> </div> <div id="content"> <div id="nav"> <ul id="menu" style="text-align: center"> <li>Site <ul> <li><a href="index.php?page=Home">News</a></li> <li><a href="index.php?page=Site_Map">Site Map</a></li> <li><a href="board/index.php">Forums</a></li> <li><a href="index.php?page=Members">Members</a></li> </ul> </li> <li>Guides <ul> <li><a href="index.php?page=C++">C++</a></li> <li><a href="index.php?page=Java">Java</a></li> <li><a href="index.php?page=PHP">PHP</a></li> <li><a href="index.php?page=CSS">CSS</a></li> <li><a href="index.php?page=HTML">HTML</a></li> </ul> </li> <li>Games <ul> <li><a href="index.php?page=Games">Coming Soon!</a></li> </ul> </li> <li>Account <ul> <li><a href="index.php?page=Settings">Settings</a></li> <li><a href="index.php?page=Stuff">My Stuff</a></li> <li><a href="index.php?page=Profile">Profile</a></li> </ul> </li> <li>Support <ul> <li><a href="index.php?page=Contact">Contact Us</a></li> <li><a href="index.php?page=FAQ">FAQ</a></li> <li><a href="index.php?page=Staff">Staff</a></li> <li><a href="index.php?page=Donate">Donate!</a></li> </ul> </li> </ul> </div> <div id="stuff"> <?php $page_name = $_GET['page']; if(!$page_name) { include("/index.php"); } elseif($page_name == 'Register') { include("/create.php"); } elseif($page_name == 'Site_Map') { include("/map.php"); } elseif($page_name == 'Members') { include("/members.php"); } elseif($page_name == 'C++') { include("/guides/c++.php"); } elseif($page_name == 'Java') { include("/guides/java.php"); } elseif($page_name == 'PHP') { include("/guides/php.php"); } elseif($page_name == 'CSS') { include("/guides/css.php"); } elseif($page_name == 'HTML') { include("/guides/html.php"); } elseif($page_name == 'Games') { include("/games.php"); } elseif($page_name == 'Settings') { include("/account/settings.php"); } elseif($page_name == 'Stuff') { include("/account/stuff.php"); } elseif($page_name == 'Profile') { include("/account/profile.php"); } elseif($page_name == 'Contact') { include("/support/contact.php"); } elseif($page_name == 'FAQ') { include("/support/faq.php"); } elseif($page_name == 'Staff') { include("/support/staff.php"); } elseif($page_name == 'Donate') { include("/support/donate.php"); } else { echo "404 Not Found!"; } ?> </div> </div> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/102985-less-php-pages/page/2/#findComment-528482 Share on other sites More sharing options...
Ne.OnZ Posted April 27, 2008 Author Share Posted April 27, 2008 I did that, now it says no such file or directory for all of them except C++, which says 404 not found. :o Quote Link to comment https://forums.phpfreaks.com/topic/102985-less-php-pages/page/2/#findComment-528485 Share on other sites More sharing options...
dezkit Posted April 27, 2008 Share Posted April 27, 2008 rewrite the scripts so they are only in the root directory and place all the files in the root directory. Quote Link to comment https://forums.phpfreaks.com/topic/102985-less-php-pages/page/2/#findComment-528490 Share on other sites More sharing options...
Ne.OnZ Posted April 27, 2008 Author Share Posted April 27, 2008 That's the thing, those files don't exist. Shouldn't it print out 404 like c++? Since C++ don't exist either. Quote Link to comment https://forums.phpfreaks.com/topic/102985-less-php-pages/page/2/#findComment-528493 Share on other sites More sharing options...
Ne.OnZ Posted April 27, 2008 Author Share Posted April 27, 2008 It seems, I needed to add a period in front of the links: "./account/settngs.php" Of course it brings up an error saying that the file don't exists. So I created a dummy news page saying hello and it showed up. So it saying 404 not found isn't really a problem if I add the pages. Unless you could think of something o.O Thanks For all your help everyone. Quote Link to comment https://forums.phpfreaks.com/topic/102985-less-php-pages/page/2/#findComment-528499 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.