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();
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
insert mysql embeded videos as blobs?
Using TinyMCE my client will be able to embed images and flash videos into large columns of text whi
Php WordPress help
I am writing the following code for making a plugin
<?php
header("Content-Type
Error when call dll from oracle
Hi all, please help me!
I have dll write C language, I want call it from oracle procedur
Only add new information from XML to MySQL
What I am doing, is taking a xml file, and adding the values to a database. However, what I want to
get the country of visitor and display content based on that
Hello all,
I have seen that Google analytics can tell you where a visitor is coming from and
progress bar...need expert opinion of experienced webmaster
Hey guys, quick question:
I want to display a progress bar when I upload files, but I am not
Matchcode in ALV change header column
Hello everyone,
I am working in an SAP system that is currently in upgrade and conversion
pls clear my confusion
Hi friends,
Pls solve my query .
what is the exact use of Scope Resolution Operator( i
Problem with variable declaration in switch statement
Hello, I am having some trouble assigning a value to a variable inside a switch statement. What I a
simplexml_load_file and rss problem
Hi,
I have a problem parsing an rss feed using simplexml_load_file - this is strange as i hav