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
Check premium expire
Hi,
I am making a simple file hosting site and want to check if users premium subscriptions h
FPDF Help
I've been playing with the FPDF module. I was building a form and rolling right along and then sudde
square instead of number
Hello
I do not know why but this code seems to work fine only in my xampp local insallation but n
Simple MySQL query...
Hello,
How could I do a mysql query that does this: SELECT * WHERE date/time < 5minutes ag
am I using this for loop correctly
Dear buddies!
Right now I am generating a report with some details for all the dealers.
php slowing my site?
Hi all,
I think that one of the reasons that my site doesn't work fast is that the code is ve
Wierd if else problem
Hi guys,
this probably aint wierd for you, but it seems like php is playin up to me. may b i
array & querys help/advice.
Ok so here goes , I have a mysql database and basically here's what I need to do.
// foreach
Redirect not working after making a POST/GET
Hi Everyone,
I am a novice in PHP. Here I have 2 pages, one page with a textbox and button an
ScriptManager History and Opera Issue
I am having an issue in opera with the ScriptManager. I have a ScriptManager on a page with history