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();
Did you know?Explore Trending and Topic pages for more stories like this.
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
Delete all from a table
I can not get the following code to work. If I run the sql statement in the db it will delete all t
array_diff weirdness
I'm using the following bit of code
$diff = array_diff($pids, $pidlist);
$diff = array_va
text box alphanumeric caracters only
hi all!
I have search on google on how to enter in a test box only caracters A-Z,a-z,0-9 usi
When i am Canseling the Billing Document in VF11 I am getting Shortdump
Hi Experts
When i am Canseling the Billing Document in VF11 I am getting Shortdump.
Problem with PHP code- simple contact form
I'm relativily new to PHP; I know HTML and CSS stuff but I have a problem- I have a contact form wit
Working with Global Variables
hi, I'm not really sure why the following code is returning a "Call to a member function getBan
Slow data retrieval which requires improvement..please help
I am working on a Help Desk Ticketing system and have a page called MY TICKETS which shows all ticke
Parse Error Help
Hello, I got the parse error "Parse error: syntax error, unexpected ',' in register.php on line
Need a fuction to count entries in a field
Hi
I need a fuction to count how many times a email address is entered in to a field.
I ma
This is driving me nuts!
This insert query looks to be alright, however I get this error:
QuoteYou have an error in yo