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
an interesting question
Greetings folks, got to ask an interesting question...
let say
i have created a function s
need help in update query
hi
i have a dynamic form. i need help in how can i use update query when values from dynamic for
Inserting 100x and 100y coordinates in mysql table - easy
Is there a way to insert this data into a mysql table named 'map' with the fields: 'x int 3' , 'y in
mails going in spam??
The mails I sent to folks in my database using mail(function) are going in spam??
Any idea ho
PHP Upload issue
Hi guys,
I have stumble across an interesting issue with my script and is doing my head in.
Timer control causing error
I recently decided to add a timer control to an existing page that uses AJAX on my site. As soon as
j1inmis Ouput layout changes
Hi,
Can anybody tell how can j1inmis output layout can be changed so that vendor names ge
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
email form (cannot find the problem)
Hello there. I've been having trouble with an email form. Can't find the problem really. I've tested
C problem struct and string
Hi guys,
This is my first post and I'm hoping the experts here can help me solve my problem.<