Jump to content

alphamoment

Members
  • Posts

    31
  • Joined

  • Last visited

Everything posted by alphamoment

  1. Thank you for the reply. The 0's 1's 2's were just examples. I appreciate the responses as they have helped me greatly!
  2. I'm using this current PHP Code in my Index.php; <?php $page = $_GET['page']; if (!isset($page)) { include('home.php'); } if ($page == "Home") { include('home.php'); } if ($page == "0101") { include('0101.php'); } if ($page == "0202") { include('0202.php'); } ?> Then I'm using this for my Navigation link; <li><a href="?page=0101">Members</a></li> Which displays as index.php?page=0101 But on those pages I want to go into another page off of them, for example; index.php?page=0101&subpage=0102 index.php?page=0202&subpage=0201 How can I achieve this?
  3. Hi I'm using PHP for my Navigation Menu, My navbar is in a file named "home.php" looks like this: <ul class="nav navbar-nav navbar-right"> <li><a href="?page=home">Home</a></li> <li><a href="?page=about">About</a></li> <li><a href="?page=services">Services</a></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="?page=service2">Service 2</a></li> </ul> </ul> Then in my index.php: $page = $_GET['page']; if (!isset($page)) { include('home.php'); } if ($page == "home") { include('home.php'); } if ($page == "about") { include('about.php'); } if ($page == "services") { include('services.php'); } if ($page == "service2") { include('service2.php'); } It all works how I want it to except for one thing; I'd like to add; <li class="active"> To the page that is currently being viewed. How can I do this? Thank you in advance.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.