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
array ...
hi
Code: function formatCategories($categories, $parentId)
{
// $navCat stores all child
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
Multi-user card game
I'm writing a batch of games and such. Lottery is finished, Poker,blackjack,etc are next. They will
close site for maintenance
i get a tutorial, saying the following code can put our site offline, and only the developer can vie
how to remove in php string display
My code is
$message="We're looking at developing our website.";
$body= "My mess
Simple Variable Question
Hi everyone.... again,
I am really getting into php still. Learning more every day. I love it
strtotime issue
Hey all,
I'm playing around with some code, and basically the idea is:
Person changes
pagination numbering pattern
Hello,
I have following code which works great for pagination. but i have small issue now.
help with contest script
I would like to code a contest script to my site but i don't know how. Could someone just give me pu
Receive Rosettanet Message to SAP 4.6c
Dear all ,
My customer will send the PO details by rosettanet message , Is it