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
Help with setcookie()
Merry Xmas to those on this foruum
Older guy here with some experience but not allot so please be
PHP mail() returns true but doesn't work
First off I apologize if this is a newbie question, and I generally don't like asking questions that
Table control is disappearing from Screen
Hi Experts,
I have a screen with multiple table control(TC). Each table control has two c
value not going in data base
hello friends....
i am having a working javascript....when i am selecting any
Pagination won't carry results past page 2.
Hi all,
I've worked out my pagination script and its paginating fine until I click next from
how to populate a drop down box
Hi buddies!
PROCEDURE DOWNLOAD_REPORT_FORM (report_name varchar)
is
begin
DOWNLO
Progress bar tracking file downloads
Hey guys, was wondering if there was a way to track how far a file has been downloaded. I know there
imap: how to save a copy of sent emails to sent elements
Hello my friends,
I am writing an online emailing application with inbox outbox/sent elements
PHP5 - AJAX help
I've been following the tutorial on w2schools (http://www.w3schools.com/php/php_ajax_database.asp) a
Forgot password won't work
My forgot password thing is not working properly. It is giving me this errorMailbox unavailable. The