If statement help please.
Posted on
16th Feb 2014 07:03 pm by
admin
Hello on my site I have 2 content boxes. 1 is for the main content (which is the biggest one) and the second one is for a sub navigation (which is a small box). I am trying to write an IF statement so that if ?content=(a certain value) then the sub navigation which is box #2 will display that page sub navigation. Here is what I have so far.
Code: <?
session_start();
Did you know?Explore Trending and Topic pages for more stories like this.
include'dbconfig.php';
$content = $_GET[content];
if($content != 'hub' or $content !='hr' or $content !='crewcenter'){include'content/newmembers.php';}
//Displays side menu for HR navigation
if($content == 'hr'){?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center"><strong><a href="#">Roster</a></strong></div></td>
</tr>
<tr>
<td><div align="center"><strong><a href="#">Staff</a></strong></div></td>
</tr>
<tr>
<td><div align="center"><strong><a href="#">Job Openings</a></strong></div></td>
</tr>
<tr>
<td><div align="center"><strong><a href="#">Forms</a></strong></div></td>
</tr>
</table>
<? }elseif( $content == 'crewcenter' }{
}
?>
The main problem I am trying to fix is that when I go the HR page it shows the newmembers.php and it still shows the hr submenu, I just want to show the HR submenu. This is the same problem for the crew center. Please help.
Thanks in Advanced
No comments posted yet
Your Answer:
Login to answer
336
33
Other forums
need to add "sizes" to shopping cart
Hey guys, I am trying to figure out a way to add a "size" selector on to this bit of code.
New to mysqli library - Multiple query problem
Greetings,
I am writing a batch program that executes 3 queries on a single page. Using mysql
controlling/creating accounts with privileges
hi all,
i'm trying to figure out how i can create/control account with privileges, for instance a
Character Set Setup
Whats the best character set to use if you want every character to work, and also how do you make yo
Connect to database that isn't localhost
I am currently doing a small script for a company that doesn't have mySql support on there hosting.
Logic question
im wondering what's the best method to do the above list:
it is for alliance @ MMORPG game
login box shows up again after logging in 2nd login works
Hello,
I am having trouble on my site Lockerz.rack111.com where when you login the login box
Storing the referrer in session... problems with tabs
Hello All
I am currently working on an ERP project based on the MVC methodology, when a user
close site for maintenance
i get a tutorial, saying the following code can put our site offline, and only the developer can vie
Accessing element of object array
Hello
My object looks like this:
Array ( [0] => User Object ( [id] =>