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
simple php table loop
Hi all,
I've the following code
<?php // Create category options
Procedural to OOP
John Kleijn said that to avoid writing "crappy code", we should learn OOP and common OO pr
ALV sum various columns problem
Hi all,
I'm doing a report on ABAP for a timesheet of the current month. The output i want is s
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
DOMDocument parsing
Hello, I am parsing an xml file from an API which I have converted into a DOMDocument in php. This i
matching numbers inside ( )
I know I can match numbers by just [0-9]+, so I thought matching numbers inside ( ) would be somethi
PHP Blog help
Need help with posting comments in a word press blog? I have a comments page where the comments are
There was a problem with the request. (Code: 0)
Any Idea what could cause this? I get it randomly at best. But with both IE and FF. It derives from
problem with GROUP BY and ORDER BY
i usually use this query to display the last 10 entries from a sql table:
Code: $query = &quo
On page view, minus credit
Hello all, please, I need a little help with this script. I am charging one credit (credits can be p