Web Analytics Made Easy -
StatCounter Need help with PHP Navigation! Somesthing totaly wrong :( - CodingForum

Announcement

Collapse
No announcement yet.

Need help with PHP Navigation! Somesthing totaly wrong :(

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need help with PHP Navigation! Somesthing totaly wrong :(

    I've been going through many different ways of doing PHP navigation and for some reason I can only get two pages to show up! The news page and one other page.. And all my pages should be able to work! There all coded the same way!

    I attached a .txt file with my index.php coding. I would really appretiate it if someone would help me figure this out! If you go to my site: http://www.forcefx.net You will see that only the (more..) under the ablum reviews and the updates section works.. I don't get it Thanks for any help! I appreciate it!
    Attached Files

  • #2
    not looked very hard but the first thing that pops out is that in your switch statement

    switch($id) {
    default:
    include('news/news.php');

    you have the `default` case first when it should be the last option in the switch block
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

    Comment


    • #3
      Would this work? Well accualy its not work.. So maybe somethings wrong

      Code:
      <?php
      
      				$errormsg = "404 Error. You probably got this error because my lazy *** hasn't finished the site yet!";
      
      				$navsignthing = "$fxx";
      
      				$extension = "php";
      
      				if(file_exists("$navsignthing.$extension"))
      
      				{
      
      				include "$navsignthing.$extension";
      
      				}
      
      				elseif($navsignthing==""){
      
      				include "news/news.php";
      
      				}
      
      				else
      
      				{
      
      				echo "$errormsg";
      
      				}
      
      			   ?>

      Comment

      Working...
      X