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
Career Change into SAP
Hai
I am sajesh ,did my diploma in Mechatronics i have a 4 years of experience in
Strange Oracle Query problem
Ok So I have this PHP class that talks to a Javascript class that basically creates a table of infor
Class not found error
I am getting Class 'index' not found in Eval function:
//write config
$pat
php problem?
I don't think I'm stupid, but maybe I am.
I am working on a sit for a friend I am try to put
array_combine() error
getting an "Warning: array_combine() [function.array-combine]: Both parameters should have an e
dynamic table with forms
I have a table that is populated with mysql data and in teh first column there is a raido button tha
cURL Upload Help
OK, I am creating a bridge from a local program to my website and I am trying to find the best way t
Text to picture Generator
Hello, i have found this script and it works really good^^ But i have one problem, i would like to c
my sql select id and then update problem.
I need to select some auto incremented ids out of a database and then use those id in a where statem
Logic question
im wondering what's the best method to do the above list:
it is for alliance @ MMORPG game