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
ldap connection
We are using ldap to get user information from the domain controller. It was working before. Recentl
Count on multidimensional array
Hi, i got an array as below:
Array
(
=> Array
(
Formatting echo from database
So I have a database that stores First and last names, then echos them back to a website, as of now
MFC GUI Programming
I am working on a project right now that requires me to create a MFC Windows GUI. Basically it need
Text Not Displaying Correctly With PHP:GD
I recently moved servers and since then I have noticed that one line of text is showing weirdly.
Java API in PHP?
I have an application that we use internally here at the office.
The software company provide
I need to increse 6hours more, and i don't know how???
I need to increse 6hours more, and i don't know how???
<tr>
<t
error with opendir
when i do this
if ($handle = opendir($dir)) {
while (false !== ($file = readdir($han
Update Database
Hi All,
I have a problem with this:
Code: [Select]<?php
session_start();
DBCA Templates
Hi all,
I'm working on creating a template for DBCA, but can't find any documentation on the