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
XML Grouping
I'm using xml_parse_into_struct to get all my elements, but now I need to group them. For example, h
Remove values in array2 from array1
I have two arrays.
Array 1 is where the array key holds various different numbers. For exampl
Retrieving Data from Two Different Databases
Hello All,
Ran into another problem and would appreciate some help! I have two datab
Displaying Column Names
I have a question regarding the ability to show the column names from my table/query.
What I'm lo
Sum of Values in an Array
This is probably really simple... but it's been years since I've written anything, so bare with me!<
Generating unique numbers using php
Hi,
I need help in generating unique number using php.I tired using rand() in php.But, by using r
Getting a variable to work in function params
I have this fuction which is inside a class:
Code: public static function generateEmbedCode($
newbie error
what is wrong with this code ?
<html>
<body>
<?
Feed Maker
Hi all.
First of all I must say I am not a php developer so I am afraid I don't know much about i
Check Date/Time in PHP
What I need the code to check is that $reQuest is 24 hours in the past then return a time based on h