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
Menu restriction
How can I restrict the individual menu that would appear when a user logs in so that all users are c
Hashing?
Hi, I was hoping to take a string value then convert it - consistently - across each of our pages in
Saas with SAP R/3
hi experts,
Is SaaS offer available in SAP? for SAP R/3? from where i can get the info a
iMatch stored value with the current value in a loop
Hello,
I have a MySQL db were I store articles in.
I have a form to fill these article
Problem with shopcart code
Hello, I am having a bit of trouble being able to add a product to my shopcart. My mysql database i
getting a website's source code as a variable? How?
Hey guys, is there any way for me to get the source code of a website as a variable for me to work w
what are '%S%', '%E%'
for example when i see Code: [Select]printf("Hello %srn", $name);
what does %s means
LIMIT $start, 10... how to pass last value queried into next page with GET??
Ok I know how to display the first or last 10 results of a query...
$result = mysql_query(&q
PHP time (deadline within one week)
I have a column ['projdue'], which stores the deadline for a project.
I have PHP code and <
get multiple rows
Hi I want to get multiple rows from a db
I am using this for the db query
Code: public