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
Problem Dereferencing
With these types and tables:
CREATE TYPE MANAGER AS OBJECT (
MGR_ID INTEGER,
Dynamic Array using glob?
Is there an easier way to do this?
I am trying to get create a dyamic array based on files wi
convert PHP array to Javascript array
I have a page that gets a request sent from AJAX, and I am trying to convert a PHP array to a javasc
Error In Syntax
I got this error:
Code: Parse error: syntax error, unexpected '>' in /home/bucket/publ
Sales orders ans reservations not taken into account on MPS / MRP
Hello,
I am implementing the MPS / MRP and I have the following problem:
I ha
Securing a user input - need some confirmation
Hello All,
I am in the process of recoding a large proportion of an e-commerce site, one of t
php/mysql auto logout after 2 hour and reset password
Hi all,
This I hope will make sense. I've the following code which when a user logins in, cr
Recode Abap Dynpro into Web Dynpro
Hi All,
A client has asked us to look at rearchitecting a custom transaction that was developed
noob question
i traying to do a php form with auto replay for both(me and the user who send me a mail),
a u
list files from folder, only one for each date
I have many files in a folder and wish to only list one of each date
these are the file names